|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
The jc block size this nest will step by, under model (#479's harness arm). More...
#include <gemm_blocked.hpp>
Static Public Member Functions | |
| static const simd::blocking_params & | rbp () |
Static Public Attributes | |
| static constexpr std::size_t | vla_lanes = 0 |
| static constexpr simd::blocking_params | bp = simd::default_blocking<TC> |
The jc block size this nest will step by, under model (#479's harness arm).
M0 SHORT-CIRCUITS TO THE SHIPPED CONSTANT rather than recomputing itself. nc_from_budget(l3_default, kc, sdata, nr) and derive_blocking's round_down(l3/(kc*sdata), nr) are the same formula, so the two agree today – test_nc_models asserts exactly that, and it is the assertion that would fire if either drifted. But "they agree because I checked the algebra" is not the property the M0 arm needs. It needs to be the code that ships, so that a six-arm comparison has a control which cannot have moved. The equality is therefore a TEST, not a load-bearing assumption of the default path.
TWO PASSES, because a model needs jc_nt to balance against and jc_nt depends on nc, which is what the model computes. Plan once at the baseline nc to learn the grid, ask the model, and let the caller re-plan. This is the same shape the nest already uses for mc – plan_gemm_grid then balanced_mc – and it is deliberately IDENTICAL to evaluate() in benchmarks/sweep_nc_models.cpp, so the shapes that sweep nominates are the shapes this arm actually runs.
It feeds the model bp.kc (compile-time) for the same reason: that is what the sweep fed it, and a harness that quietly substituted rbp.kc would answer a different question than the one the committed sweeps asked. Where the two differ – a machine whose detected L1 moves kc, see the pin at blocking.hpp:351 – the nest builds a rbp.kc x nc panel while the models reasoned about bp.kc x nc. That is a real caveat on such a machine, so the harness REPORTS the divergence rather than papering over it here. The register tile and cache blocks a GEMM runs with (#427).
batch_tile<TC> is batch<TC>'s: simd::default_blocking for mr x nr (a micro-kernel template argument), simd::runtime_blocking for the detected cache blocks. Everything but a scalable target uses it.
vla_tile<TC, W> is the tile for W lanes on a SCALABLE target, where batch<TC> has one lane but the hardware has W: the same derivation (derive_blocking against target_hw_traits) at nvec = W, so a 128-bit SVE copy has NEON's tile. gemm_blocked instantiates one per vector length that ships (128, 256 and 512 bits) and runs the one whose W equals Lanes(d) on the machine, so a copy never runs at a length it does not assume.
|
inlinestatic |
|
staticconstexpr |
|
staticconstexpr |