19using TrmmChoice = std::variant<Triangular, Expand, Vendor>;
24inline constexpr std::array<std::string_view, 3>
last_resort{
"expand",
"triangular",
"vendor"};
33inline constexpr std::array<std::string_view, 4>
key_names{
"side:exact",
"order:log:2",
"q:log",
"batch:log"};
36inline constexpr std::array<int, 9>
grid_order{1, 16, 32, 64, 128, 256, 512, 1024, 2048};
37inline constexpr std::array<int, 5>
grid_q{1, 16, 128, 1024, 4096};
38inline constexpr std::array<int, 4>
grid_batch{1, 128, 1024, 32768};
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
constexpr std::array< int, 9 > grid_order
order axis
constexpr std::array< int, 5 > grid_q
q axis of the grid
constexpr std::array< std::string_view, 4 > key_names
Keys: side exact; order = A.rows(), weight 2 (work ~ order^2 q batch); q = B.cols() (Left) or B....
constexpr std::int64_t kMaxGridTiles
triangular: row x column tiles in grid y
constexpr std::array< int, 4 > grid_batch
batch axis of the grid
constexpr auto candidates()
Every compiled choice, in tie-break order (§6.3): triangular, expand, vendor.
constexpr std::array< std::string_view, 3 > last_resort
nothing runs
constexpr std::int64_t kMaxGridBatch
both natives: batch in grid z; 65536 throws
constexpr int kNativeWg
widest native work-group: the 128-row tile, the expansion
constexpr select::OpSpec spec
op, vendor library, rules
std::variant< Triangular, Expand, Vendor > TrmmChoice
row tile (trmm_row_tile) derived; natives: CUDA GPU
Flat kernel selection: one choose() per op over measured per-device tables.
expand_triangular + the public gemm; scratch must fit
trmm_triangular_tiles: Side::Left; tile grid <= 65535
backend::trmm_vendor (cublas?trmm 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...