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
| 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. |
| 211 | inline 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) |
| 225 | inline int64_t select_long_at() { |
| 226 | static const int64_t at = [] { |
no test coverage detected