namespace gpr::linalg::schemeii

Overview

namespace schemeii {
 
// enums
 
enum Engine;
enum Int8Provider;
 
// structs
 
struct Options;
struct Plan;
struct Task;
 
// classes
 
class Context;
class Operand;
 
// global variables
 
int kDefaultBits = 56;
int kMaxBits = 62;
 
// global functions
 
std::int64_t engineChunk(Engine engine, std::int64_t k);
std::vector<std::uint32_t> engineModuli(Engine engine, std::int64_t chunk);
int scaleExponent(double max_abs, int bits);
bool isSpec(std::string_view spec);
Options parseOptions(std::string_view spec);
 
} // namespace schemeii

Detailed Documentation

Global Functions

std::int64_t engineChunk(Engine engine, std::int64_t k)

Inner chunk length of one exact GEMM for an engine.

std::vector<std::uint32_t> engineModuli(Engine engine, std::int64_t chunk)

Moduli of an engine for an inner chunk length, largest first.

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.

Options parseOptions(std::string_view spec)

Parses “scheme2:<fp64|int8>[: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.