Configuration: lower-level API

Overview

Per-size tuning lookups, environment parsers and internal hooks behind settings() and configure().

Functions

◆ note_queue_constructed()

void batchlas::detail::note_queue_constructed ( )
noexcept

Latch recording that a Queue exists, which closes configure().

Called only by Queue's constructors.

◆ queue_constructed()

bool batchlas::detail::queue_constructed ( )
noexcept

True once note_queue_constructed() has been called.

◆ tuning_env_override()

int32_t batchlas::tuning::detail::tuning_env_override ( const EnvValue & captured,
int32_t fallback )
inline

The captured override if it is a clean positive 32-bit integer, else fallback.

Unset, empty, unparseable, trailing garbage ("16x"), non-positive or out-of-range values all yield fallback, the compiled constant.

Parameters
capturedthe captured BATCHLAS_TUNE_* value from settings()
fallbackthe compiled constant for this n

Definition at line 37 of file tuning_params.hh.

◆ ormqr_block_size_default_for_n()

int32_t batchlas::tuning::ormqr_block_size_default_for_n ( int32_t n)
inlineconstexpr

Compiled ORMQR_BLOCK_SIZE_* bucket for n (no override).

Definition at line 139 of file tuning_params.hh.

◆ ormqr_block_size_for_n()

int32_t batchlas::tuning::ormqr_block_size_for_n ( int32_t n)
inline

ormqr WY block width for order n; override BATCHLAS_TUNE_ORMQR_BLOCK_SIZE.

Definition at line 232 of file tuning_params.hh.

◆ gebrd_block_size_for_n()

int32_t batchlas::tuning::gebrd_block_size_for_n ( int32_t n)
inline

gebrd panel width for order n; override BATCHLAS_TUNE_GEBRD_BLOCK_SIZE.

Definition at line 239 of file tuning_params.hh.

◆ sb2st_back_tile_for_n()

int32_t batchlas::tuning::sb2st_back_tile_for_n ( int32_t n)
inline

sb2st wave back-transform tile for order n, or 0 for "keep the call site's heuristic"; override BATCHLAS_TUNE_SB2ST_BACK_TILE.

Note
0 is reachable only from the compiled constant: the override forces a geometry, never auto. The same holds for sb2st_back_subs_for_n() and sy2sb_ormqr_nb_for_n().

Definition at line 249 of file tuning_params.hh.

◆ sb2st_back_subs_for_n()

int32_t batchlas::tuning::sb2st_back_subs_for_n ( int32_t n)
inline

sb2st wave back-transform sub-group count for order n, or 0 for the heuristic; override BATCHLAS_TUNE_SB2ST_BACK_SUBS.

Definition at line 257 of file tuning_params.hh.

◆ sy2sb_ormqr_nb_for_n()

int32_t batchlas::tuning::sy2sb_ormqr_nb_for_n ( int32_t n)
inline

sy2sb back-transform WY width for order n, or 0 for the shape gate; override BATCHLAS_TUNE_SY2SB_ORMQR_NB.

Definition at line 265 of file tuning_params.hh.

◆ sytrd_block_size_for_n()

int32_t batchlas::tuning::sytrd_block_size_for_n ( int32_t n)
inline

sytrd panel width for order n; override BATCHLAS_TUNE_SYTRD_BLOCK_SIZE.

Definition at line 272 of file tuning_params.hh.

◆ latrd_lower_panel_wg_hint_for_n()

int32_t batchlas::tuning::latrd_lower_panel_wg_hint_for_n ( int32_t n)
inline

latrd lower-panel work-group size hint for order n, 0 for none; override BATCHLAS_TUNE_LATRD_WG_HINT.

Definition at line 280 of file tuning_params.hh.

◆ latrd_lower_panel_wg_hint()

int32_t batchlas::tuning::latrd_lower_panel_wg_hint ( )
inline

latrd_lower_panel_wg_hint_for_n() at n = 256, for the legacy path.

Definition at line 287 of file tuning_params.hh.

◆ sytrd_fuse_panel_update_for_n()

bool batchlas::tuning::sytrd_fuse_panel_update_for_n ( int32_t n)
inlineconstexpr

Whether sytrd fuses the panel update at order n.

No BATCHLAS_TUNE_* override; see SelectionSettings::sytrd_fuse_panel_update.

Definition at line 292 of file tuning_params.hh.

◆ stedc_recursion_threshold_for_n()

int32_t batchlas::tuning::stedc_recursion_threshold_for_n ( int32_t n)
inline

stedc leaf size for order n; override BATCHLAS_TUNE_STEDC_RECURSION_THRESHOLD.

Note
32 is the CTA invariant (sub-group width), not a tuning result.

Definition at line 303 of file tuning_params.hh.

◆ stedc_merge_variant_for_n()

int32_t batchlas::tuning::stedc_merge_variant_for_n ( int32_t n)
inline

stedc merge variant for order n, as a StedcMergeVariant value (1 Fused, 2 FusedCta); override BATCHLAS_TUNE_STEDC_MERGE_VARIANT.

Definition at line 313 of file tuning_params.hh.

◆ stedc_threads_per_root_for_n()

int32_t batchlas::tuning::stedc_threads_per_root_for_n ( int32_t n)
inline

stedc secular-solve threads per root for order n; override BATCHLAS_TUNE_STEDC_THREADS_PER_ROOT.

Definition at line 321 of file tuning_params.hh.

◆ stedc_wg_multiplier_for_n()

int32_t batchlas::tuning::stedc_wg_multiplier_for_n ( int32_t n)
inline

stedc merge work-group multiplier for order n; override BATCHLAS_TUNE_STEDC_WG_MULTIPLIER.

Definition at line 329 of file tuning_params.hh.

◆ env_truthy()

bool batchlas::env_truthy ( const char * v)
inline

True when v is exactly one of 1, true, TRUE, on, ON.

Parameters
vthe variable's value (std::getenv(...)), not its name; nullptr means unset
Returns
false for an unset variable and for every other spelling

Definition at line 29 of file env.hh.

◆ env_falsy()

bool batchlas::env_falsy ( const char * v)
inline

True when v is exactly one of 0, false, FALSE, off, OFF.

Not !env_truthy(v): an unset variable is neither truthy nor falsy, which lets a caller distinguish "forced off" from "not specified".

Parameters
vthe variable's value, or nullptr when unset
Returns
false for an unset variable and for every other spelling

Definition at line 44 of file env.hh.

◆ env_int_or()

int batchlas::env_int_or ( const char * name,
int fallback )
inline

The integer value of environment variable name.

Parameters
namethe variable's name
fallbackreturned when the variable is unset or std::stoi rejects it
Returns
the parsed value; note that std::stoi accepts a numeric prefix ("16x" is 16)

Definition at line 55 of file env.hh.

◆ env_positive_int_or()

int batchlas::env_positive_int_or ( const char * name,
int fallback )
inline

As env_int_or(), but a value <= 0 also yields fallback.

The shape of every kernel-geometry knob: a forced work-group count, tile width or sub-group count is meaningless at zero or below.

Parameters
namethe variable's name
fallbackreturned when unset, unparseable or non-positive

Definition at line 72 of file env.hh.

◆ env_string_or()

std::string batchlas::env_string_or ( const char * name,
const std::string & fallback )
inline

The value of environment variable name, or fallback when it is unset or empty.

Definition at line 79 of file env.hh.