Skip to content

fix(docker): resolve TorchRec dependencies without replacing native packages - #538

Closed
lidongdongbuaa wants to merge 1 commit into
NVIDIA:mainfrom
lidongdongbuaa:enh-dynamicemb-gb300
Closed

lidongdongbuaa wants to merge 1 commit into
NVIDIA:mainfrom
lidongdongbuaa:enh-dynamicemb-gb300

Conversation

@lidongdongbuaa

@lidongdongbuaa lidongdongbuaa commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

The Docker image installs TorchRec and TensorDict with --no-deps, so their declared Python dependencies can be missing even when the native PyTorch/FBGEMM stack is installed. Training workers can then fail while importing TorchRec or TensorDict.

Resolve those dependencies with exact constraints for the already installed PyTorch and FBGEMM versions, so pip cannot replace either native package. Keep the selected Python dependency versions and check TensorDict, pyre_extensions and torchmetrics imports during the image build. Update the installation instructions to match the Dockerfile's TorchRec v1.8.0-rc1 / FBGEMM v1.8.0 stack.

The final diff contains only docker/Dockerfile and corelib/dynamicemb/README.md, based on main@d53b9c8. Main already includes SM103 training-build support through #528. This PR only fixes dependency installation for the training environment; the native build and embedding runtime remain unchanged.

Validation

  • Pre-commit passed for both changed files.
  • The TorchRec Docker RUN block passes bash -n.
  • Executed the actual constraint generator with mocked installed-version metadata and verified exact Torch/FBGEMM constraints. Checked that both pip install commands resolve dependencies under those constraints.
  • Verified that setup.py and the inference CMakeLists.txt are byte-identical to main. The CPU/CMake regression file and its build notes are absent from the final diff.
  • git diff --check passed.

These checks ran on macOS. No Docker image build, dependency installation, CUDA compilation or GPU execution was performed for this head. The earlier CMake and GPU validation does not apply to this two-file dependency fix; image build/import validation and maintainer CI are still pending.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Installation documentation matches the final change.
  • The image build includes dependency import checks.
  • Run the updated Docker build and validate TorchRec import on the GPU training host.

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no outstanding review findings.

Summary

The PR resolves TorchRec's Python dependencies while keeping the installed PyTorch and FBGEMM versions fixed.

  • TorchRec installs its Python dependencies while keeping native package versions fixed.

Reviews (6) · Last reviewed commit: "fix(docker): resolve TorchRec dependenci..." · Reviewed by Greptile

Comment thread corelib/dynamicemb/CMakeLists.txt Resolved
shijieliu added a commit to shijieliu/recsys-examples that referenced this pull request Nov 12, 2026
DEMB_ARCHS, the architectures of DynamicEmb's kernels and of its
eviction fatbins (the SASS one and the LTO-IR one that nvJitLink links
the user's score function into), defaulted to 75;80;90;100;120. GB300
is sm_103: the default build ran its sm_100 code there, and no sm_103
LTO-IR. The default is now 75;80;90;100;103;120, less the architectures
the CUDA compiler cannot build (nvcc --list-gpu-code): sm_103 needs CUDA
12.9 or newer. Without an answer from nvcc it is the old list. An
explicit DEMB_ARCHS skips the query.

The README says how DEMB_ARCHS works (TORCH_CUDA_ARCH_LIST does not
apply to these kernels).

The same change as NVIDIA#549's, without its image bump, so that this
branch builds in the current NGC 26.07 image.

Following NVIDIA#538, which found that the default build omits sm_103.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
@lidongdongbuaa lidongdongbuaa changed the title build(dynamicemb): support Grace GB300 with CUDA 13 and SM103 fix(dynamicemb): preserve CMake targets and CPU build dependencies Nov 13, 2026
@greptile-apps

greptile-apps Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@lidongdongbuaa lidongdongbuaa changed the title fix(dynamicemb): preserve CMake targets and CPU build dependencies fix(docker): resolve TorchRec dependencies without replacing native packages Nov 13, 2026
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.

2 participants