MCPcopy Create free account
hub / github.com/Niko1221/Strata / select_long_on

Function select_long_on

engine/src/core/verify.cpp:211–223  ·  view source on GitHub ↗

STRATA_SELECT_LONG=1 (opt-in): a window graph past select_long_at() cells takes the long-context QSA select (qsa_block_topk_long's multi-CTA top-k through topk_scratch_, qsa_block_scores_long's shuffle-free decode scorer; both compute capability 6.x by default, the same ids and score bits). Each costs ~6 more kernels a call, which only a longer context pays back (4x GP100: 0.5 ms a window more at

Source from the content-addressed store, hash-verified

209// a longer context pays back (4x GP100: 0.5 ms a window more at 1K, even at 30K, 4.0-4.7 ms less at 300K), so the
210// verifier keeps a second set of window graphs for it. Off: no scratch, no second graphs.
211inline bool select_long_on() {
212 static const bool on = [] {
213 const char* v = std::getenv("STRATA_SELECT_LONG");
214 if (v == nullptr || v[0] != '1') return false;
215 if (strata::kernels::qsa_topk_multi_scratch_ints(1) <= 0) { // a build without the multi-CTA kernels: no second graphs
216 std::fprintf(stderr, "strata verify: STRATA_SELECT_LONG=1 needs the CUDA build with STRATA_EXPERIMENTAL_SM60; "
217 "ignored\n");
218 return false;
219 }
220 return true;
221 }();
222 return on;
223}
224// STRATA_SELECT_LONG_AT: the threshold in cells (default 65536; 0: always)
225inline int64_t select_long_at() {
226 static const int64_t at = [] {

Callers 5

verify.cppFile · 0.85
prelaunchMethod · 0.85
runMethod · 0.85
capture_allMethod · 0.85
pl_launchMethod · 0.85

Calls 1

Tested by

no test coverage detected