Skip to content

Avoid cuBLAS in L2 persistence benchmark#52

Merged
msaroufim merged 2 commits into
masterfrom
codex/l2-expected-no-cublas
Jun 10, 2026
Merged

Avoid cuBLAS in L2 persistence benchmark#52
msaroufim merged 2 commits into
masterfrom
codex/l2-expected-no-cublas

Conversation

@msaroufim

Copy link
Copy Markdown
Member

Summary

Generate the L2 persistence test's expected output with an elementwise reduction instead of the benchmark helper that dispatches through cuBLAS. The benchmarked kernels still use the single-column GEMM path from #51; only expected-output setup avoids cuBLAS.

Root cause

The main-branch CI failure after #51 happened at expected-output generation, before timing started:

expected = _gemm_vec(w, x)
torch.mm(w, x_col)
RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemm(...)

That showed the instability was using cuBLAS during test-case setup, not specifically GEMV.

Validation before opening

  • python3 -m py_compile test/l2_persistence.py
  • git diff --check
  • Full Modal L4 suite using the failed 07424cc/run 27250846501 wheel artifact passed, including l2_persistence.py with OK: L2 persistence confers no benchmark advantage.

I am leaving this as draft until the PR's own GitHub Actions run is green.

@msaroufim
msaroufim marked this pull request as ready for review June 10, 2026 07:58
@msaroufim msaroufim changed the title Avoid cuBLAS in L2 expected output Avoid cuBLAS in L2 persistence benchmark Jun 10, 2026
@msaroufim
msaroufim merged commit 9124ecc into master Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant