Contents

class

SushiAI::Graph::MixedPrecisionPolicy

Selects lower precision for compute-bound operations.

Declared in
include/SushiAI/graph/precision.hpp
Inherits
SushiAI::Graph::IPrecisionPolicy

Narrows matrix multiplications while keeping sensitive reductions wide.

Public member functions

explicit MixedPrecisionPolicy(DType low=DType::HALF)

Builds a policy narrowing the compute-bound ops to low.

Parameters

low

The narrow element type; must be a real float.

Exceptions

Error

If low is complex or integral.

DType low() const noexcept

The narrow element type this policy narrows to.

virtual PrecisionChoice choose(const PrecisionQuery &query) const override

Chooses the element type query's operation computes in.

Parameters

query

The operation and its declared precision.

Returns

The element type and the reason for it.

virtual std::string_view name() const noexcept override

Returns a short identifier for reporting and diagnostics.

Returns

Static string identifying the policy name.