choice.hh
Go to the documentation of this file.
1#pragma once
2
3/// @file
4/// @brief ormqr: blocked, vendor. evidence: docs/perf/qr.md @ingroup api_selection_ops
5
7
8#include <array>
9#include <string_view>
10#include <variant>
11
13
14struct Blocked : select::NoFields<"blocked"> {}; ///< ormqr_blocked (larft + level-3 WY updates); GPU, no complex Trans
15struct Vendor : select::NoFields<"vendor"> {}; ///< backend::ormqr_vendor; no complex Trans either
16
17using OrmqrChoice = std::variant<Blocked, Vendor>; ///< fieldless: WY width and gemm/trmm spelling are derived
18
19template <class T> /// Every compiled choice, in tie-break order (§6.3).
20constexpr auto candidates() { return select::all_of<OrmqrChoice>(); }
21
22inline constexpr select::OpSpec spec{Op::ormqr, select::Lib::factorization}; ///< last resort (§5.5): blocked, vendor
23
24inline constexpr std::array<std::string_view, 6> key_names{ ///< m: Q's order, k: reflectors, q: C's other extent
25 "side:exact", "trans:exact", "m:log", "k:log", "q:log", "batch:log"}; // T and C stay apart; work ~ m k q batch
26
27/// The transcription grid; the transcriber (tuned/README.md) spells the same one (k <= m).
28inline constexpr std::array<int, 4> grid_m{1, 8, 64, 512};
29inline constexpr std::array<int, 3> grid_q{1, 32, 1024};
30inline constexpr std::array<int, 3> grid_batch{128, 2048, 32768};
31
32} // namespace batchlas::ops::ormqr
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
Definition select.hh:110
constexpr std::array< int, 4 > grid_m
The transcription grid; the transcriber (tuned/README.md) spells the same one (k <= m).
Definition choice.hh:28
constexpr std::array< int, 3 > grid_batch
Definition choice.hh:30
constexpr select::OpSpec spec
last resort (§5.5): blocked, vendor
Definition choice.hh:22
std::variant< Blocked, Vendor > OrmqrChoice
fieldless: WY width and gemm/trmm spelling are derived
Definition choice.hh:17
constexpr std::array< int, 3 > grid_q
Definition choice.hh:29
constexpr auto candidates()
Every compiled choice, in tie-break order (§6.3).
Definition choice.hh:20
constexpr std::array< std::string_view, 6 > key_names
m: Q's order, k: reflectors, q: C's other extent
Definition choice.hh:24
Flat kernel selection: one choose() per op over measured per-device tables.
ormqr_blocked (larft + level-3 WY updates); GPU, no complex Trans
Definition choice.hh:14
backend::ormqr_vendor; no complex Trans either
Definition choice.hh:15
Base of a family with no knobs: struct Cta : NoFields<"cta"> {};.
Definition select.hh:101
What an op's choice.hh declares once: its name, the library its Vendor family calls (one gate for can...
Definition select.hh:529