25 if (std::holds_alternative<Cta>(c))
return d.
is_gpu && d.
has_sg32 && transposed;
26 if (std::holds_alternative<Vendor>(c))
return d.
has_vendor;
30inline constexpr std::array<std::string_view, 2>
last_resort{
"vendor",
"direct"};
34inline constexpr std::array<std::string_view, 4>
key_names{
"trans:exact",
"out:log",
"red:log",
"batch:log"};
37inline constexpr std::array<int, 8>
grid_out{1, 8, 64, 255, 256, 1024, 4096, 32768};
38inline constexpr std::array<int, 11>
grid_red{1, 8, 32, 63, 64, 128, 352, 353, 1024, 4096, 32768};
39inline constexpr std::array<int, 8>
grid_batch{1, 16, 128, 319, 320, 1024, 8192, 32768};
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
constexpr std::array< std::string_view, 4 > key_names
Keys: trans exact (ConjTrans folds to T); out, red: y and x lengths (swap with trans)....
constexpr std::array< std::string_view, 2 > last_resort
CPU: vendor, else direct (no GPU gate).
bool device_allows(const GemvChoice &c, const select::Device &d, bool transposed)
can_run's device terms (host-callable for tests). Cta body 3 is reqd_sub_group_size(32).
constexpr select::OpSpec spec
op, vendor library, rules
constexpr std::array< int, 8 > grid_out
Both sides of every transcribed threshold plus a coarse log grid; the transcriber spells the same.
std::variant< Cta, Direct, Vendor > GemvChoice
fieldless: body and segment width W derived in the drivers
constexpr auto candidates()
Every compiled choice, in tie-break order: the transcribed ladder.
constexpr std::array< int, 11 > grid_red
constexpr std::array< int, 8 > grid_batch
Flat kernel selection: one choose() per op over measured per-device tables.
sycl_gemv::gemv_native_cta, sub-group per output; Trans/ConjTrans
sycl_gemv::gemv_native_direct, item per output; every device
backend::gemv_vendor; any shape, needs the library
The device facts a can_run predicate and the table lookup read (§5.1).
bool has_vendor
the asking op's library group (OpSpec::vendor) is compiled in
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...