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
lowThe narrow element type; must be a real float.
Exceptions
ErrorIf
lowis complex or integral.
DType low() const noexceptThe narrow element type this policy narrows to.
virtual PrecisionChoice choose(const PrecisionQuery &query) const overrideChooses the element type query's operation computes in.
Parameters
queryThe operation and its declared precision.
Returns
The element type and the reason for it.
virtual std::string_view name() const noexcept overrideReturns a short identifier for reporting and diagnostics.
Returns
Static string identifying the policy name.

