Repository navigation
Upgrade to Torch 2.11 with Cuda 13.1 - #347
Conversation
|
CI passed. |
Greptile SummaryThis PR upgrades the build environment to CUDA 13 / PyTorch 2.11, pins FBGEMM and TorchRec to their v1.5.0 releases, migrates CUB iterators to Thrust equivalents for CUDA 13 compatibility, and fixes the previously flagged TorchRec version check using
Confidence Score: 4/5PR is functionally correct except for the nvcomp CUDA 12 archive in a CUDA 13 environment, which should be resolved before shipping. All Python and CUDA source changes are correct and address prior review feedback. The one P1 finding is the unchanged nvcomp download referencing a CUDA 12 binary inside the newly CUDA 13-based build stage — a likely oversight from the upgrade that could cause link/runtime failures. docker/Dockerfile — specifically the nvcomp archive download in the build stage (line ~92).
|
| Filename | Overview |
|---|---|
| docker/Dockerfile | Upgrades base image to CUDA 13 / PyTorch 2.11, pins FBGEMM v1.5.0 and TorchRec release/V1.5.0, adds CUDA 13 symlink step and --no-build-isolation for hstu; nvcomp archive still references cuda12 (P1). |
| corelib/dynamicemb/dynamicemb/planner/rw_sharding.py | Replaces fragile startswith() version check with packaging.version.Version comparison (< 1.5.0), adds env parameter to both _create_embedding_kernel overrides; addressing prior review feedback correctly. |
| corelib/dynamicemb/src/index_calculation.cu | Migrates from cub::TransformInputIterator to thrust::make_transform_iterator and adds host annotation to CastI32ToI64 functor for CUDA 13 / Thrust compatibility. |
| corelib/dynamicemb/src/index_calculation.h | Replaces cub::CountingInputIterator with thrust::counting_iterator; correct and minimal change. |
| corelib/dynamicemb/setup.py | Removes compute_70/sm_70 (Volta/V100) from NVCC gencode flags, consistent with the FBGEMM and commons arch-list changes also dropping 7.0. |
| third_party/FBGEMM | Submodule pointer bumped from df29adb to 65bad42, tracking the FBGEMM v1.5.0 release. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Docker Build: nvcr.io/nvidia/pytorch:26.02-py3\n(CUDA 13 / PyTorch 2.11)"] --> B[Install base deps\ntorchx, gin-config, cloudpickle, triton 3.6.0\nnvidia-cutlass-dsl 4.3.0]
B --> C[Build & install FBGEMM v1.5.0\narch: 7.5 8.0 9.0]
C --> D[Install TorchRec release/V1.5.0]
D --> E[Create CUDA 13 include symlink\ncuda-13/cccl/cuda → /usr/local/cuda/include/cuda]
E --> F[Build & install fbgemm_gpu_hstu\n--no-build-isolation]
F --> G{build stage}
G --> H[Install dynamicemb\nsetup.py: arch 7.5 8.0 9.0]
G --> I[Download nvcomp\n⚠️ cuda12 archive]
G --> J[Build examples/commons\narch: 7.5 8.0 8.6 9.0]
style I fill:#ffcccc,stroke:#cc0000
Reviews (4): Last reviewed commit: "Fix docker file" | Re-trigger Greptile
|
Tip: Greploops — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
469122b to
b6db87c
Compare
This pull request focuses on upgrading the CUDA, PyTorch, TorchRec, and FBGEMM dependencies, as well as updating related build and source files to ensure compatibility with the new versions. It also includes several code changes to migrate from CUB to Thrust APIs and to improve compatibility with the updated libraries.
Dependency and Docker environment upgrades:
nvcr.io/nvidia/pytorch:26.02-py3), switched to the CUDA 13 toolkit in all relevant paths, and updated the PyTorch, TorchRec, and FBGEMM versions to their latest releases. Also updated the CUDA architectures list for builds.Source code and compatibility changes:
cub::TransformInputIteratorandcub::CountingInputIteratorwiththrust::make_transform_iteratorandthrust::counting_iteratorfor better compatibility with CUDA 13.TorchRec and FBGEMM integration:
Updated submodules and Docker build steps to use TorchRec v1.5.0-rc2 and FBGEMM v1.5.0, and adjusted build arguments for CUDA architectures accordingly.
Updated
rw_sharding.pyto handle changes in the latest TorchRec API, including version checks for theenvparameter and conditional logic for different TorchRec versions. Meanwhile, they also keep compatible with TorchRec v1.2.0.These changes collectively modernize the build environment and codebase, ensuring compatibility with the latest CUDA and PyTorch ecosystem libraries.