19using GesvdChoice = std::variant<Jacobi, Cta, Blocked, Vendor>;
27inline constexpr std::array<std::string_view, 4>
key_names{
"herm:exact",
"vec:exact",
"m:log:1.5",
"n:log:1.5"};
30inline constexpr std::array<int, 15>
grid_mn{1, 2, 4, 8, 16, 24, 32, 33, 48, 64, 65, 128, 256, 512, 1024};
31inline constexpr std::array<std::string_view, 3>
grid_herm{
"N",
"L",
"U"};
32inline constexpr std::array<std::string_view, 3>
grid_vec{
"none",
"all",
"thin"};
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
constexpr auto candidates()
Every compiled choice, in tie-break order (§6.3): native first, vendor last.
constexpr std::array< std::string_view, 4 > key_names
Keys: herm N|L|U and vec none|all|thin (from the CANONICAL jobs) exact; m, n log weight 1....
constexpr select::OpSpec spec
last resort (§5.5): blocked, vendor
constexpr std::array< std::string_view, 3 > grid_vec
std::variant< Jacobi, Cta, Blocked, Vendor > GesvdChoice
natives need a GPU; cta, blocked: complex only if Hermitian
constexpr std::array< int, 15 > grid_mn
Both sides of every driver ceiling (32 cta, 64 jacobi) plus a coarse log grid, as tuned/README....
constexpr std::array< std::string_view, 3 > grid_herm
Flat kernel selection: one choose() per op over measured per-device tables.
gesvd_blocked: bidiagonalisation + bdsdc, or syev_blocked (Lower)
gesvd_cta: normal equations + syev_cta, max(m, n) <= 32, not thin
gesvdj_cta: one-sided Jacobi, max(m, n) <= 64, not Hermitian
backend::gesvd_vendor; needs the solver library
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...