Skip to content

chore: Remove stale CUBLAS_WORKSPACE_CONFIG requirement#697

Merged
ValerianRey merged 2 commits into
mainfrom
make-it-easier-to-run-on-cuda
May 21, 2026
Merged

chore: Remove stale CUBLAS_WORKSPACE_CONFIG requirement#697
ValerianRey merged 2 commits into
mainfrom
make-it-easier-to-run-on-cuda

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

Summary

CUBLAS_WORKSPACE_CONFIG=:4096:8 appeared in three places (CONTRIBUTING.md, tests/profiling/run_profiler.py, tests/profiling/speed_grad_vs_jac_vs_gram.py) but is no longer needed. This PR removes it.

History

  • Initial squashed commit (June 2024): tests/unit/conftest.py called torch.use_deterministic_algorithms(True) unconditionally for all devices. CUBLAS_WORKSPACE_CONFIG=:4096:8 is required by cuBLAS when deterministic mode is enabled on CUDA, so the variable was necessary.

  • Commit 83d2e046 ("Add command for cuda unit tests in CONTRIBUTING.md"): Added the CUBLAS_WORKSPACE_CONFIG=:4096:8 instruction to CONTRIBUTING.md for running unit tests on CUDA — correct at the time.

  • PR feat: add autogram.Engine (batched) #387 / commit d1594301 ("feat: add autogram.Engine (batched)", Aug 2025): Changed conftest.py to only call torch.use_deterministic_algorithms(True) on CPU, with an explicit comment explaining why ("we also use GPU to benchmark algorithms, and we would rather have them use non-deterministic but faster algorithms"). The commit message even lists "Force using deterministic algorithms only on CPU" under the Testing section. However, CUBLAS_WORKSPACE_CONFIG was left behind in all three places — an oversight.

Since PR #387, CUBLAS_WORKSPACE_CONFIG has been unnecessary:

  • Tests on CUDA: deterministic algorithms are not enabled → cuBLAS does not require the workspace config.
  • Profiling on CUDA: same, and non-deterministic algorithms are preferable for benchmarking.
  • tests/trajectories/optimize.py: does call use_deterministic_algorithms(True) unconditionally, but all its tensors are CPU-only (the script ends with .numpy() calls), so cuBLAS is never involved.

🤖 Generated with Claude Code

@ValerianRey ValerianRey requested a review from a team as a code owner May 20, 2026 23:11
@ValerianRey ValerianRey added the cc: chore Conventional commit type for changes to some configuration files of the project. label May 20, 2026
@ValerianRey ValerianRey requested a review from PierreQuinton May 21, 2026 00:28
@ValerianRey ValerianRey merged commit ad000c2 into main May 21, 2026
16 checks passed
@ValerianRey ValerianRey deleted the make-it-easier-to-run-on-cuda branch May 21, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: chore Conventional commit type for changes to some configuration files of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants