.. index:: pair: namespace; gpr::linalg::schemeii .. _doxid-namespacegpr_1_1linalg_1_1schemeii: namespace gpr::linalg::schemeii =============================== .. toctree:: :hidden: enum_gpr_linalg_schemeii_Engine.rst enum_gpr_linalg_schemeii_Int8Provider.rst struct_gpr_linalg_schemeii_Options.rst struct_gpr_linalg_schemeii_Plan.rst struct_gpr_linalg_schemeii_Task.rst class_gpr_linalg_schemeii_Context.rst class_gpr_linalg_schemeii_Operand.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace schemeii { // enums enum :ref:`Engine`; enum :ref:`Int8Provider`; // structs struct :ref:`Options`; struct :ref:`Plan`; struct :ref:`Task`; // classes class :ref:`Context`; class :ref:`Operand`; // global variables int :target:`kDefaultBits` = 56; int :target:`kMaxBits` = 62; // global functions std::int64_t :ref:`engineChunk`(:ref:`Engine` engine, std::int64_t k); std::vector :ref:`engineModuli`(:ref:`Engine` engine, std::int64_t chunk); int :ref:`scaleExponent`(double max_abs, int bits); bool :target:`isSpec`(std::string_view spec); :ref:`Options` :ref:`parseOptions`(std::string_view spec); } // namespace schemeii .. _details-namespacegpr_1_1linalg_1_1schemeii: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; engineChunk .. _doxid-namespacegpr_1_1linalg_1_1schemeii_1a548454eb911831d780b3e47387584e99: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::int64_t engineChunk(:ref:`Engine` engine, std::int64_t k) Inner chunk length of one exact GEMM for an engine. .. index:: pair: function; engineModuli .. _doxid-namespacegpr_1_1linalg_1_1schemeii_1a4eae2655fcd772a1c82245cdf3a0a669: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector engineModuli(:ref:`Engine` engine, std::int64_t chunk) Moduli of an engine for an inner chunk length, largest first. .. index:: pair: function; scaleExponent .. _doxid-namespacegpr_1_1linalg_1_1schemeii_1a0429c0c0cb1335d391a96ec9a1c70a3b: .. ref-code-block:: cpp :class: doxyrest-title-code-block int scaleExponent(double max_abs, int bits) s with max_abs \* 2^s < 2^(bits-1) <= 2 max_abs \* 2^s; zero for zero. Computed from a global maximum it is the exponent to supply when the rows or columns of one product are split across calls along k. .. index:: pair: function; parseOptions .. _doxid-namespacegpr_1_1linalg_1_1schemeii_1a6fb9a872f2590daf8a707cbfc9ebd888: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Options` parseOptions(std::string_view spec) Parses "scheme2:[:bits=B][:moduli=N][:provider=P] [:library=PATH][:device=D][:device_min=W][:threads=T][:block_rows=R] [:block_cols=C]". provider=cuda multiplies on INT8 tensor cores through libgpr_scheme2_cuda.so (``CudaEngine.h``) and returns the bits of the CPU providers: residues are prepared on the host, every product and reconstruction of a run happens on the device. Throws std::invalid_argument.