|
docc 0.8.3 (0d44999b)
C++ API Reference
|
How contractions (MatMul and GEMM nodes) of Float and Double compute, as users select it. More...
#include <sdfg/fp_math/passes/contraction_precision.h>
Public Types | |
| enum class | Kind { Native , Quantize , Ozaki } |
Public Member Functions | |
| std::string | str () const |
Static Public Member Functions | |
| static ContractionPrecision | parse (const std::string &spec) |
Public Attributes | |
| Kind | kind = Kind::Native |
| OzakiVariant | variant = OzakiVariant::Modular |
| int | parameter = 0 |
| Bits for Quantize, slices or moduli for Ozaki; 0 picks the default. | |
| Rescaling | rescaling = Rescaling::Exponents |
| How the transformations apply the scales; not part of the spec, but chosen by the target, as Direct for targets without Double, floor or exact powers of two (Ozaki then slices). | |
How contractions (MatMul and GEMM nodes) of Float and Double compute, as users select it.
| Spec | Computation |
|---|---|
| native | unchanged |
| int8 | QuantizeContraction with 8 bits (lossy); int2 ... int7 use fewer |
| ozaki | OzakiContraction, modular, as many moduli as the output precision needs |
| ozaki1[:s] | OzakiContraction, slicing with s slices (default: by precision) |
| ozaki2[:L] | OzakiContraction, modular with L moduli (default: by precision) |
|
strong |
|
static |
| std::invalid_argument | for a malformed spec |
| std::string sdfg::fp_math::ContractionPrecision::str | ( | ) | const |
| Kind sdfg::fp_math::ContractionPrecision::kind = Kind::Native |
| int sdfg::fp_math::ContractionPrecision::parameter = 0 |
Bits for Quantize, slices or moduli for Ozaki; 0 picks the default.
| Rescaling sdfg::fp_math::ContractionPrecision::rescaling = Rescaling::Exponents |
How the transformations apply the scales; not part of the spec, but chosen by the target, as Direct for targets without Double, floor or exact powers of two (Ozaki then slices).
| OzakiVariant sdfg::fp_math::ContractionPrecision::variant = OzakiVariant::Modular |