[fix] Build DeepGEMM against selected torch - #2139
Conversation
There was a problem hiding this comment.
Code Review
This pull request integrates the external deep-gemm package into the project's dependencies and CI pipeline, building it against the selected PyTorch runtime to resolve compatibility issues with vLLM's vendored extension. It updates pyproject.toml with the new dependency, build configurations, and source repository, adds a new test to verify that deep_gemm loads correctly, and updates the documentation accordingly. Feedback suggests using pytest.importorskip in the new test to gracefully skip it in environments where deep-gemm is not installed, preventing unexpected test failures.
|
CI note: |
Signed-off-by: Hersh Godse <hersh@trajectory.ai>
18eb761 to
1b23829
Compare
|
Follow-up: the first revision added the CUDA-built package to both |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 1b23829. Configure here.

Summary
c10symbol when vLLM imports its vendored extension.CUDA_HOME.This changes no Torch, vLLM, FlashInfer, or CUDA version and adds no runtime monkey patch.
Failure reproduced
On SkyRL
955c3e23, Torch2.11.0+cu130, and vLLM0.28.0, importingvllm.third_party.deep_gemm._Cfailed with an undefinedc10::ValueErrorsymbol. GLM 5.3 TP8 startup then failed because its sparse-attention indexer requires DeepGEMM. Rebuilding revision8b1392b978f5a03c828dd1711090d7fb50958b8aagainst the selected Torch made the extension importable;deep_gemm.get_num_sms()returned all 148 B300 SMs and vLLM reported DeepGEMM support enabled.Validation
uv lock --checkcheck_code_quality,skyrl_gym_tests,skyrl_train_tests, and the fullskyrl_testssuite pass on the final commit.36m18s: initialized mean logprob difference0.031523; deliberate-update effect0.028250; updated mean difference0.031979; acceptance threshold0.05.1049812passed4×4×1end to end on the same image:16/16rollouts, real forward/backward, optimizer step, finite gradient/KL/ESS/log-ratio metrics, durable checkpoints 0 and 1, and clean scheduler release.The repository GPU workflow did not launch a remote job because the PR context had no
ANYSCALE_CLI_TOKEN; it failed at credential validation before GPU setup or tests. The B300 receipts above cover the extension, GLM startup, parity, and real training path.Scope and risk
The package is Linux/x86_64 and Megatron-only. It adds a source build during environment creation, so image build time increases. Runtime behavior outside consumers that import DeepGEMM is unchanged.