24inline constexpr std::array<std::string_view, 2>
last_resort{
"expand",
"vendor"};
28inline constexpr std::array<std::string_view, 4>
key_names{
"form:exact",
"m:log",
"n:log",
"batch:log"};
31inline std::string_view
form_of(std::int64_t a, std::int64_t b) {
32 return 2 * std::min(a, b) >= std::max(a, b) ?
"sq" : (a > 2 * b ?
"tall" :
"wide");
36inline constexpr std::array<std::string_view, 3>
grid_form{
"sq",
"tall",
"wide"};
37inline constexpr std::array<int, 14>
grid_mn{1, 2, 4, 8, 16, 32, 64, 128, 255, 256, 512, 1024, 2048, 4096};
38inline constexpr std::array<int, 9>
grid_batch{1, 2, 3, 4, 8, 128, 1024, 8192, 32768};
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
std::variant< Expand, Vendor > SymmChoice
fieldless: expansion ld and gemm tile derived; native: CUDA GPU
constexpr std::array< int, 9 > grid_batch
batch axis of the grid
constexpr std::array< int, 14 > grid_mn
m, n
std::string_view form_of(std::int64_t a, std::int64_t b)
sq if 2 min >= max, else tall (a > 2b) or wide: the transcribed squareish ratio as an exact key.
constexpr int kExpandWg
expand_mirrored's work-group: kMirrorGroupCols x kMirrorTile
constexpr select::OpSpec spec
op, vendor library, rules
constexpr std::int64_t kMaxGridBatch
expand_mirrored puts the batch in SYCL dim 0 = CUDA grid z
constexpr auto candidates()
Every compiled choice, in tie-break order (§6.3): the expansion, then the vendor loop.
constexpr std::array< std::string_view, 2 > last_resort
nothing in the row runs
constexpr std::array< std::string_view, 4 > key_names
Keys: form exact (the transcribed squareish test as an axis); m, n: C's extents; batch....
constexpr std::array< std::string_view, 3 > grid_form
form axis of the grid
Flat kernel selection: one choose() per op over measured per-device tables.
expand_mirrored into scratch + the public gemm; scratch must fit
backend::symm_vendor (cublas?symm / cblas_?symm loop)
Base of a family with no knobs: struct Cta : NoFields<"cta"> {};.
What an op's choice.hh declares once: its name, the library its Vendor family calls (one gate for can...