mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 14:21:06 -10:00
dsv41: no warm_flow on Metal (it aborted the engine at start)
warm_flow() runs cublasSgemm / cublasGemmEx on tiny scratch inputs at load. The Metal compatibility layer (metal/include/metal_compat/cublas_v2.h) only has the dispatches the real flow uses: its sgemm_tn found no host view for the scratch buffers and the call ended in strata_metal_dense_gemm_missing(), an abort (exit code -6) on every start, restarted in a loop by the server. start_warm() now returns at once under STRATA_METAL. Found on an M5 Max with the 2.25 bpw set: the v0.2.9 engine answered the four checks; this tree aborted until DS4_WARM=0 was set.
This commit is contained in:
1 parent
b3e73dbfb6
commit
d93547aed5
1 file changed
+7
-1
@@ -3810,7 +3810,13 @@ struct Model::Impl {
|
||||
std::atomic<bool> flow_used{false};
|
||||
std::thread warm_bg;
|
||||
void start_warm() {
|
||||
if (chunk <= 0 || (std::getenv("DS4_WARM") && std::atoi(std::getenv("DS4_WARM")) == 0)) return;
|
||||
#if defined(STRATA_METAL)
|
||||
// Not on Metal: warm_flow() calls cublasSgemm / cublasGemmEx on tiny scratch inputs, and the Metal compatibility layer
|
||||
// (metal/include/metal_compat/cublas_v2.h) has only the dispatches the real flow uses; a warm-up call it cannot place
|
||||
// ("sgemm_tn has no host view") aborts the engine at start. Metal has no BLAS library start to pay either.
|
||||
return;
|
||||
#endif
|
||||
if (chunk <= 0 ||(std::getenv("DS4_WARM") && std::atoi(std::getenv("DS4_WARM")) == 0)) return;
|
||||
warm_bg = std::thread([this] {
|
||||
std::lock_guard<std::mutex> lk(warm_mu);
|
||||
if (flow_used.load() || quit.load()) return;
|
||||
|
||||
Reference in new issue
Block a user