| 175 | } |
| 176 | |
| 177 | bool tq_kernels_enabled() { |
| 178 | static const bool on = [] { |
| 179 | if (const char* e = std::getenv("STRATA_NO_TQ_KERNELS"); e != nullptr && std::atoi(e) != 0) return false; |
| 180 | // Every CPU runs them: the scalar kernel (baseline x86-64) where there is no AVX2. A ggml built from upstream |
| 181 | // has no vec_dot for the trellis types to fall back to, so a CPU without AVX2 must not be sent there. |
| 182 | return true; |
| 183 | }(); |
| 184 | return on; |
| 185 | } |
| 186 | |
| 187 | const char* tq_isa_name(TqIsa isa) { |
| 188 | return isa == TqIsa::avx512 ? "avx512" : isa == TqIsa::avx2 ? "avx2" : "scalar"; |
no outgoing calls
no test coverage detected