BatchLAS Documentation
BatchLAS
v0.1.0
src
ops
posv
choice.hh
Go to the documentation of this file.
1
#pragma once
2
3
/// @file
4
/// @brief posv: tiny, cta, blocked.
5
/// `evidence: docs/perf/potrf.md#posv-selection-since-flat-kernel-selection-phase-3` @ingroup api_selection_ops
6
7
#include <
src/select/select.hh
>
8
9
#include <array>
10
#include <string_view>
11
#include <variant>
12
13
namespace
batchlas::ops::posv
{
14
15
struct
Tiny
:
select::NoFields
<"tiny"> {};
///< posv_tiny_dispatch: fused factor + solve, small n and nrhs
16
struct
Cta
:
select::NoFields
<"cta"> {};
///< public potrf + potrs_fused_dispatch; B fits in SLM
17
struct
Blocked
:
select::NoFields
<"blocked"> {};
///< public potrf + two public trsm; any homogeneous batch
18
19
using
PosvChoice
= std::variant<Tiny, Cta, Blocked>;
///< fieldless: buckets, nb and wg are derived in the driver
20
21
template
<
class
T>
/// Tie-break order (§6.3). No vendor family: a `vendor` pin warns and runs Auto.
22
constexpr
auto
candidates
() {
return
select::all_of<PosvChoice>
(); }
23
24
inline
constexpr
select::OpSpec
spec
{
Op::posv
,
select::Lib::none
};
///< no library; blocked's children report errors
25
26
inline
constexpr
std::array<std::string_view, 4>
key_names
{
///< work: n^3/3 + 2 n^2 nrhs
27
"uplo:exact"
,
"n:log:3"
,
"nrhs:log"
,
"batch:log"
};
28
29
/// potrf's grid_n within [1, 1024]; the transcriber (tuned/README.md) spells the same grid.
30
inline
constexpr
std::array<int, 33>
grid_n
{1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56,
31
64, 80, 96, 112, 128, 160, 192, 224, 256, 288, 320, 384, 448, 512, 640, 768, 1024};
32
inline
constexpr
std::array<int, 6>
grid_nrhs
{1, 2, 4, 8, 16, 64};
33
inline
constexpr
std::array<int, 5>
grid_batch
{128, 512, 2048, 8192, 32768};
34
35
}
// namespace batchlas::ops::posv
batchlas::select::all_of
constexpr auto all_of()
Every alternative of a field-less choice variant, in declaration (= tie-break) order.
Definition
select.hh:110
batchlas::select::Lib::none
@ none
Definition
vendor.hh:74
batchlas::ops::posv
Definition
choice.hh:13
batchlas::ops::posv::key_names
constexpr std::array< std::string_view, 4 > key_names
work: n^3/3 + 2 n^2 nrhs
Definition
choice.hh:26
batchlas::ops::posv::grid_n
constexpr std::array< int, 33 > grid_n
potrf's grid_n within [1, 1024]; the transcriber (tuned/README.md) spells the same grid.
Definition
choice.hh:30
batchlas::ops::posv::grid_nrhs
constexpr std::array< int, 6 > grid_nrhs
Definition
choice.hh:32
batchlas::ops::posv::grid_batch
constexpr std::array< int, 5 > grid_batch
Definition
choice.hh:33
batchlas::ops::posv::PosvChoice
std::variant< Tiny, Cta, Blocked > PosvChoice
fieldless: buckets, nb and wg are derived in the driver
Definition
choice.hh:19
batchlas::ops::posv::candidates
constexpr auto candidates()
Tie-break order (§6.3). No vendor family: a vendor pin warns and runs Auto.
Definition
choice.hh:22
batchlas::ops::posv::spec
constexpr select::OpSpec spec
no library; blocked's children report errors
Definition
choice.hh:24
batchlas::Op::posv
@ posv
Definition
no_route.hh:24
select.hh
Flat kernel selection: one choose() per op over measured per-device tables.
batchlas::ops::posv::Blocked
public potrf + two public trsm; any homogeneous batch
Definition
choice.hh:17
batchlas::ops::posv::Cta
public potrf + potrs_fused_dispatch; B fits in SLM
Definition
choice.hh:16
batchlas::ops::posv::Tiny
posv_tiny_dispatch: fused factor + solve, small n and nrhs
Definition
choice.hh:15
batchlas::select::NoFields
Base of a family with no knobs: struct Cta : NoFields<"cta"> {};.
Definition
select.hh:101
batchlas::select::OpSpec
What an op's choice.hh declares once: its name, the library its Vendor family calls (one gate for can...
Definition
select.hh:529
Generated by
1.18.0