Skip to content

[BUILD] NGC PyTorch 26.09 base image, and DynamicEmb for GB300 (sm_103) - #549

Open
shijieliu wants to merge 11 commits into
NVIDIA:mainfrom
shijieliu:enh-ngc2609-gb300
Open

shijieliu wants to merge 11 commits into
NVIDIA:mainfrom
shijieliu:enh-ngc2609-gb300

Conversation

@shijieliu

@shijieliu shijieliu commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What

Move the Docker base image from NGC PyTorch 26.07 to 26.09, and build DynamicEmb for GB300 (sm_103) by default. The branch is merged with main 4466f9d (#528, #550, #553, #555, #478, #554, #556). #528 already brought this PR's sm_103 DEMB_ARCHS change into main.

26.07 26.09
torch 2.13.0a0+9186a08 2.14.0a0+b2c75dd
CUDA 13.3.1 13.4.1
NCCL 2.30.7 2.31.2
CUTLASS DSL / Quack 4.5.2 / 0.4.1 4.8.0.dev0 / 0.6.2, both from the base
FBGEMM GPU 1.8.0 1.9.0
TorchRec v1.8.0-rc1 v1.9.2-rc3
Triton server / client r26.07, 2.71.0 r26.09, 2.73.0

26.10 is newer, but its torch 2.15.0a0 has no FBGEMM or TorchRec release yet.

Changes

  • docker/: the versions above. FBGEMM 1.9.0 is the official cu130 wheel on x86 (sm_80, sm_90a, sm_100a, sm_120a) and, on arm64, a wheel of tag v1.9.0 built from source (below); 1.8.0 cannot stay, as it imports torch symbols that 26.09 no longer exports. The arm64 build drops the one -Werror of FBGEMM's host flags, with count guards like the TensorBody.h patch's: v1.9.0 widens its warning set, and upstream does not build it with CUDA 13.4. The devel stage keeps the base's CUTLASS DSL and Quack instead of installing Quack 0.4.1 over them, and asserts their versions.
  • C++20: torch 2.14's headers require it (ATen.h and torch/all.h #error below C++20). The targets that include them and asked for C++17 move to C++20: DynamicEmb's inference ops and recsys_kvcache_manager's ops (CMake), commons' hstu_cuda_ops, HSTU's AOTI cpp_inference and nve_init_hook, and the HSTU attention submodule, whose setup.py the Dockerfile edits at build time. The AOTI NVE 26.05 loader and nve_init_hook compile NVE 26.05's headers with torch's: under C++20 its bit_ops.hpp takes std::has_single_bit and its siblings, which reject the signed values it passes, so the Dockerfile keeps NVE 26.05 on its own C++17 reimplementations (its only C++20 switch, made false; later NVE casts the values). DynamicEmb's main extension already builds as C++20. Since the merge with main, so do [FEA] Support configurable indexing and NVE layers for exportable embedding collections #478's inference build in DynamicEmb's CMakeLists.txt and its two C++ examples, example/exportable_embedding/cpp (the image builds it) and example/host_embedding.
  • The HSTU submodule (third_party/FBGEMM, the fork jiayus-nvidia/FBGEMM) needs two edits for 26.09. docker/patch_fbgemm_hstu.sh makes them before the image installs the package:
    • its setup.py asks for C++17, which PyTorch 2.14's headers reject (as before, now moved from an inline sed);
    • its Blackwell backward passes pipeline.CooperativeGroup an alignment argument, equal to the size, in 7 calls. CUTLASS DSL 4.5.2 deprecated and ignored it; 4.8 removed it, so the B200 smoke test failed to compile the backward. The script drops it and asserts the count.
    • The CI's build_whl builds the HSTU wheel from the branch's own submodule checkout. With distributed-recommender!147 it runs the same script. Both edits belong in the fork; once it has them, the script can go.
    • A check of every DSL call in the submodule's HSTU code and in gr_decode_atten against the 4.8 signatures finds nothing else that runs.
  • CUTLASS DSL 4.8: the 26.09 base's 4.8.0.dev0 drops two aliases that 4.5.2 only deprecated, cute.core.ThrMma and cute.make_fragment. gr_decode_atten now uses cute.ThrMma and cute.make_rmem_tensor, which take the same arguments and exist in 4.5.2 too. A diff of the two releases' public names and class methods finds no other removed API that gr_decode_atten or examples/sid_gr calls.
  • The arm64 FBGEMM wheel. FBGEMM publishes no aarch64 CUDA wheel, so every arm64 image build compiled FBGEMM from source, which took 66 minutes, nightly included. Now install_fbgemm_gpu_arm64.sh builds a wheel and installs it. A new target, fbgemm_arm64_wheel, exports that wheel with the torch version it was built against. The CI's new build_fbgemm_arm64_wheel job (distributed-recommender!142) built it on this image, and it is published as the pre-release fbgemm-gpu-1.9.0-ngc26.09-aarch64. By default, base_fbgemm installs that wheel on arm64 (FBGEMM_ARM64_WHEEL_URL, with its sha256 and torch version), after checking that the image's torch is the one it was built against. Another base image fails that check with both versions named. An empty URL builds from source, as before.
  • DynamicEmb for GB300: DEMB_ARCHS, the architectures of DynamicEmb's kernels and of its eviction fatbins (SASS, and the LTO-IR that nvJitLink links a custom score function into), defaults to 75;80;90;100;103;120, less what nvcc cannot build: sm_103 needs CUDA 12.9 or newer. Before, a default build had no sm_103 code. The README documents DEMB_ARCHS and names the image's FBGEMM and TorchRec versions.

This takes the GB300 finding of #538 (the default build omits sm_103) in a smaller form. It leaves the inference CMake's architecture list alone: project() defines CMAKE_CUDA_ARCHITECTURES before the default is set, so that list never applies. It also leaves FBGEMM's arm64 architecture list alone, since its sm_100 code runs on sm_103.

Checks before CI

Static checks only: the dev machine has no Docker or GPU.

  • TorchRec v1.8.0-rc1 -> v1.9.2-rc3: the TorchRec classes DynamicEmb subclasses keep the methods it overrides or calls through super(), every TorchRec import of the repo resolves in both, and 1.9 needs no new runtime dependency.
  • FBGEMM 1.8.0 -> 1.9.0: the ops the repo calls keep their schemas.
  • torch 2.13 -> 2.14: the C++ APIs the extensions use are unchanged; the C++20 requirement above is the one break.
  • The versions, URLs, digests and the wheel's sha256 come from their sources: the NGC registry, PyPI, download.pytorch.org, GitHub tags, and Triton's r26.09 TRITON_VERSION and build.py.

CI

  • Pipeline #82529736 (59e3951b, on distributed-recommender!147's branch) succeeded. It rebuilt the devel images on #82485850's 26.09 Triton/FBGEMM base, and all 23 jobs passed:
    • build_whl: both wheels, the HSTU one after patch_fbgemm_hstu.sh;
    • every unit test job, inference_test_nve_2605_1gpu included;
    • B200 smoke (the CooperativeGroup fix), B200 inference, Eos hier, CoreWeave, and GB300's one-tray job;
    • GB300's two-tray job failed in 11 s on the runner's Lustre File exists error, before any test. Its retry passed: 257 checks [ok], 0 FAIL, on the arm64 26.09 image.
  • Pipeline #82485850 (e7c1fbe8, full rebuild):
    • Built every 26.09 image: FBGEMM, Triton, devel, and train on both arches.
    • Every test job passed:
      • unit_test_1gpu_a100 and _h100, with the CUTLASS DSL 4.8 fix for gr_decode_atten;
      • unit_test_4gpu, unit_test_tp_4gpu and L20_unit_test_1gpu;
      • both 8-GPU DynamicEmb suites;
      • inference_test_1gpu, inference_unit_test_1gpu and exportable_embedding_test_1gpu;
      • Eos hier, GB300 hier, B200 inference, and the CoreWeave benchmark.
    • Failed, and since fixed or explained:
      • the B200 smoke test and build_whl, on the HSTU submodule (above). 59e3951b fixes both, with distributed-recommender!147 for build_whl.
      • inference_test_nve_2605_1gpu, twice on ipp1-2030's docker system prune clash, before any test ran.
  • Earlier runs, all before the merge with main:
    • #81453230 and #81489753: FBGEMM 1.9.0 and Triton r26.09 built on both arches. The devel builds stopped at NVE 26.05's bit_ops.hpp under C++20, which 205e68c2 fixed.
    • #81512764 (205e68c2): both devel images built. L20_unit_test_1gpu, inference_test_1gpu and inference_unit_test_1gpu passed. unit_test_1gpu_a100 and _h100 failed test_beam_decode_generate.py on cute.core.ThrMma (the CUTLASS DSL 4.8 change above). The CoreWeave benchmark passed, on NCCL 2.31.2. The run was cancelled when this PR was paused.
    • #81554953 (dd16f0d5): build_fbgemm_arm64 installed the published wheel in 15 minutes, against 66 when it built FBGEMM from source. Cancelled with the pause.

🤖 Generated with Claude Code

shijieliu and others added 2 commits November 11, 2026 19:04
… Triton r26.09

Move the base image from nvcr.io/nvidia/pytorch:26.07-py3 to 26.09-py3:
torch 2.13.0a0 -> 2.14.0a0+b2c75dd, CUDA 13.3.1 -> 13.4.1, NCCL 2.30.7
-> 2.31.2, CUTLASS DSL 4.5.2 -> 4.8.0.dev0. 26.10 ships torch 2.15.0a0,
which no FBGEMM or TorchRec release targets yet.

What the image builds on it:
- FBGEMM GPU 1.9.0, version-matched to PyTorch 2.14: the official cu130
  wheel on x86 (sm_80, sm_90a, sm_100a, sm_120a; sha256 checked) and tag
  v1.9.0 built from source on arm64. 1.8.0 cannot stay: it imports torch
  symbols that 26.09 no longer exports. The arm64 build drops the one
  -Werror of FBGEMM's host flags (cmake/modules/CppLibrary.cmake), with
  the same count guards as the TensorBody.h patch: v1.9.0 widens its
  warning set, and upstream does not build it with CUDA 13.4.
- TorchRec v1.9.2-rc3 (4eed9d33, published as torchrec 1.9.2), which
  pairs with FBGEMM 1.9 and needs no new runtime dependencies.
- Triton r26.09, server and client 2.73.0; its Boost 1.80 and CMake
  floor are unchanged. Dockerfile.tritonserver moves to
  tritonserver:26.09-py3 with tritonclient 2.73.0.
- 26.09 ships CUTLASS DSL 4.8.0.dev0 and Quack 0.6.2. The devel stage no
  longer installs Quack 0.4.1 over it and asserts the base's versions;
  gr_decode_atten's requirements and README follow.

torch 2.14's headers need C++20 (ATen.h and torch/all.h #error below
it). The targets that include them and asked for C++17 move to C++20:
DynamicEmb's inference ops and recsys_kvcache_manager's ops (CMake),
commons' hstu_cuda_ops (setup.py), HSTU's AOTI cpp_inference and
nve_init_hook, and the HSTU attention submodule, whose setup.py the
Dockerfile edits at build time. DynamicEmb's main extension already
builds as C++20; the torch-free eviction fatbin and kvcache_manager's
gather/scatter kernel stay C++17.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
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), and names the FBGEMM and TorchRec versions the
image now installs (v1.9.0, v1.9.2-rc3).

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]>
shijieliu added a commit to shijieliu/recsys-examples that referenced this pull request Nov 12, 2026
…archical dist

NVIDIA#549 moves the Docker base to NGC PyTorch 26.09 (torch 2.14, CUDA 13.4,
NCCL 2.31.2, FBGEMM 1.9.0, TorchRec v1.9.2-rc3, Triton r26.09), moves the
targets that include torch headers to C++20, and builds DynamicEmb for
sm_103 (GB300) by default. This branch goes in after it.

The merge has no conflicts: setup.py takes NVIDIA#549's DEMB_ARCHS default next
to this branch's NCCL check for the hierarchical dist. With NCCL 2.31.2 in
the image, the dist builds through the gin_railed guard of the commit
before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes the shared image and native build setup used by the repository's training and inference workflows.

The standalone NVE 26.05 build issue remains and should be fixed before merging.

Findings

  1. P1 Standalone NVE builds fail ▶

Summary

Moves the build environment to NVIDIA PyTorch 26.09 and updates the matching dependencies.

  • The project images now use the PyTorch 26.09 dependency stack.
  • Arm64 image builds can install a prebuilt FBGEMM wheel.
  • PyTorch-backed C++ extensions now compile with C++20.
  • Attention kernels use the names provided by CUTLASS DSL 4.8.

Reviews (8) · Last reviewed commit: "[BUILD] Docker: one script adapts the HS..." · Reviewed by Greptile

The HSTU AOTI loader plugin for NVE 26.05 (cpp_inference's
recsys_nve_loader_2605) and nve_init_hook compile NVE 26.05's headers
together with torch's, so they now build as C++20. NVE 26.05's
bit_ops.hpp passes a signed int64_t to has_single_bit (generic_bitmask's
static_assert). Under C++20 that resolves to std::has_single_bit, which
takes only unsigned types, and the arm64 devel build of GitLab pipeline
81453230 stopped there: 'no instance of function template
"std::has_single_bit" matches the argument list'. The default NVE (the
submodule) already casts the size to unsigned.

The Dockerfile now applies the same cast to the cloned 26.05 tree, with
count guards before and after the edit. Everything else in that build
passed on arm64: FBGEMM 1.9.0 from source, Triton r26.09, HSTU as C++20,
DynamicEmb with sm_103, commons, kvcache_manager and the inference ops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
shijieliu added a commit to shijieliu/recsys-examples that referenced this pull request Nov 12, 2026
…e hierarchical dist

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cast of the commit before fixed bit_ops.hpp:158, and the next build
(GitLab pipeline 81489753, arm64) stopped at line 142 of the same header:
next_aligned's `if constexpr (has_single_bit(N))` with a signed N, 'no
matching function for call to has_single_bit(long int)'. The header takes
std::has_single_bit, countr_zero, popcount, rotl, rotr and bit_ceil under
C++20, and its own reimplementations below it; only the reimplementation
of has_single_bit accepts signed values, and NVE 26.05 relies on that.

That #if is NVE 26.05's only C++20 switch (no other __cplusplus test in its
include/, python/ or src/). The Dockerfile now makes it false, in place of
the single-line cast, so NVE 26.05 builds its bit operations exactly as it
does under C++17, its tested configuration. The guards check that the line
is there once before the edit and gone after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
shijieliu added a commit to shijieliu/recsys-examples that referenced this pull request Nov 12, 2026
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]>
shijieliu and others added 2 commits November 12, 2026 00:53
FBGEMM publishes no aarch64 CUDA wheel, so every arm64 base_fbgemm build
compiles FBGEMM GPU from source (66 minutes in GitLab pipeline 81453230),
and the CI's nightly pipeline rebuilds it every day.

install_fbgemm_gpu_arm64.sh now builds a wheel (setup.py bdist_wheel, with
the same flags as the install before) and installs it with pip. With
FBGEMM_WHEEL_DIR set, it also keeps the wheel and the torch version it is
built against (torch_version.txt) there. A new Dockerfile target,
fbgemm_arm64_wheel, holds those two files alone, for a build to export
(--output type=local) and publish.

base_fbgemm takes three build args. Given FBGEMM_ARM64_WHEEL_URL, an arm64
build checks that the image's torch is FBGEMM_ARM64_WHEEL_TORCH_VERSION (the
wheel's .so files link libtorch, whose C++ ABI is not stable across builds),
downloads the wheel, checks it against FBGEMM_ARM64_WHEEL_SHA256 and installs
it. Without a URL, the default for now, it builds from source as before.
x86 is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
…y default

The commit before lets base_fbgemm install an arm64 wheel from
FBGEMM_ARM64_WHEEL_URL. Its defaults are now the wheel of the
recsys-examples pre-release fbgemm-gpu-1.9.0-ngc26.09-aarch64: FBGEMM GPU
v1.9.0 that the fbgemm_arm64_wheel target built on this BASE_IMAGE (NGC
PyTorch 26.09) in the CI's build_fbgemm_arm64_wheel job (GitLab pipeline
81529503, 67 minutes), its sha256 and the torch it is built against
(2.14.0a0+b2c75dd062.nv26.09). So an arm64 image build downloads 535 MB
in place of the source build's 66 minutes, nightly included.

Another BASE_IMAGE fails at the torch check before the download, naming
both versions: it needs a wheel built on it, or an empty
FBGEMM_ARM64_WHEEL_URL, which builds FBGEMM from source as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
shijieliu and others added 2 commits November 15, 2026 17:57
Brings in main 4466f9d: NVIDIA#528 (hierarchical dist), NVIDIA#550, NVIDIA#553, NVIDIA#555, NVIDIA#478
(exportable embedding collections with NVE layers), NVIDIA#554 and NVIDIA#556.

Conflicts:
- corelib/dynamicemb/CMakeLists.txt: main (NVIDIA#478) adds the RPATH, NVE_ROOT
  and DYNAMICEMB_PYTHON_MODULE_DIR lines above the C++ standard; kept them,
  with this branch's C++20 (PyTorch 2.14's headers need it).
- corelib/dynamicemb/setup.py: main's file. It already has this branch's
  CUDA_HOME import and sm_103-aware default archs (from NVIDIA#528); the conflict
  was only main's new `import torch` and `Extension` imports.
- corelib/dynamicemb/README.md: main's new inference build section, after
  this branch's FBGEMM 1.9.0 / TorchRec 1.9.2 lines.

docker/Dockerfile merged cleanly: NVIDIA#478's build stage rebuilds the default
NVE from the submodule with the same pip command and settings as the devel
stage, and builds torch_binding_build through the CMakeLists above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
example/exportable_embedding/cpp, which the image's build stage compiles
against PyTorch, and example/host_embedding asked for C++17 and CUDA 17.
PyTorch 2.14's headers need C++20, as for the other targets this branch
moved (cpp_inference, nve_init_hook, recsys_kvcache_manager). host_embedding
is not built in the image, but builds against the same PyTorch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
add_library(nve_init_hook SHARED nve_init_hook.cu)
set_target_properties(nve_init_hook PROPERTIES
CUDA_STANDARD 17
CUDA_STANDARD 20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Standalone NVE builds fail

This target now requires C++20, but the NVE 26.05 header fix runs only in docker/Dockerfile. Users following nve_init_hook/README.md with stock NVE 26.05 headers hit the signed std::has_single_bit compile errors described in this PR. The same problem affects recsys_nve_loader_2605.

Apply the compatibility fix through the shared build path, or provide it as a required standalone setup step.

shijieliu and others added 3 commits November 15, 2026 18:01
…LASS DSL 4.8)

The 26.09 image's CUTLASS DSL 4.8.0.dev0 drops two aliases that 4.5.2
(26.07) only deprecated: cute.core.ThrMma ("use cute.ThrMma instead") and
cute.make_fragment ("use make_rmem_tensor instead", same arguments). The
annotations with cute.core.ThrMma raised AttributeError at import, so
unit_test_1gpu_a100 and _h100 failed test_beam_decode_generate.py on this
branch (pipeline 81512764); make_fragment would have failed next, when the
kernels compile. Both replacements exist in 4.5.2 as well.

A diff of the two releases' public names and class methods finds no other
API that gr_decode_atten or examples/sid_gr calls and 4.8 removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
…lackwell HSTU backward

CUTLASS DSL 4.8.0.dev0 (the 26.09 base) removes the alignment argument of
pipeline.CooperativeGroup, which 4.5.2 deprecated and ignored. The HSTU
submodule's hstu_blackwell/hstu_bwd.py still passes it, equal to the size,
in 7 calls, so the backward failed to compile on B200 (pipeline 82485850,
run-oci-hsg-b200-smoke: "CooperativeGroup.__init__() takes from 2 to 3
positional arguments but 4 were given"). The Dockerfile drops it before the
install, next to the setup.py C++20 edit, and asserts 7 changes. The
submodule (jiayus-nvidia/FBGEMM recsys-examples-dev) has no fix yet.

A check of every DSL call in the submodule's HSTU code and in
gr_decode_atten against the 4.8 signatures finds nothing else that runs:
nvvm.atomicrmw lost its res argument too, but atomic_add_fp32, its only
caller, is never called; the forward's cute.core.ThrMma annotations stay
strings under `from __future__ import annotations`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
…e image and the CI wheel

The CI's build_whl job builds fbgemm_gpu_hstu from the repository's own
copy of the submodule, which the Dockerfile's in-place edits never reach:
on this branch it stopped at the submodule's C++17 (pipeline 82485850,
"C++20 or later compatible compiler is required to use ATen"), and it would
have shipped the Blackwell backward that 3930e52 fixes in the image.

docker/patch_fbgemm_hstu.sh now holds both edits: C++20 in setup.py, and the
CooperativeGroup alignment argument that CUTLASS DSL 4.8 drops (7 calls of
the Blackwell backward). The devel stage runs it before the install, as the
inline edits did; a second run changes nothing, and the C++20 edit no
longer requires the C++17 flag to be there, so neither fails once the
submodule has them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: aleliu <[email protected]>
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