Repository navigation
Conversation
b0126d3 to
5b2d121
Compare
11c9ade to
adf1d18
Compare
0e6cc9c to
1f72294
Compare
Switches the custom-built TRT-LLM wheel from commit bf2ef86f
(1.3.0rc21) to NVIDIA/TensorRT-LLM@feat/rl_rc, commit f94eeb37
(1.3.0rc28), and folds in opt/dev's build-file fixes for that same
ref so this branch builds cleanly rather than rediscovering them.
- 3rdparty/TensorRT-LLM-workspace/pyproject.toml: bump [tool.trtllm].ref
and [project].version, resync [project].dependencies against the new
branch's requirements.txt. Drops upstream-removed pins (modelopt,
tensorrt, onnx, onnx_graphsurgeon, opencv-python-headless,
smg-grpc-proto) and PyNvVideoCodec (no aarch64/py3.13 wheel exists
in the pinned range, stripped at build time instead). Flags two
unresolved conflicts against this repo's own override-dependencies
(torch, nvidia-cudnn-frontend) that still need resolving before
`uv lock` will succeed.
- 3rdparty/TensorRT-LLM-workspace/_backend.py: replaced with opt/dev's
version wholesale (no dependency-list content, so no rc28-specific
changes needed) — adds ${VAR} placeholder expansion + credential
redaction for private fork URLs, and bumps _DEFAULT_ARCH to
100-real;103-real;107-real (Blackwell/Blackwell-Ultra/Rubin).
- tools/build-custom-trtllm.sh: replaced with opt/dev's version —
drops the now-invalid modelopt patch (kept as an unasserted no-op
sed for alignment), adds the PyNvVideoCodec strip patch, guards
(rather than asserts) the now-optional cutlass_kernels CMake patch,
adds the deep_ep/nvshmem arch patch, bumps the arch list and default
job count, and adds NIXL/UCX support (ENABLE_UCX=ON, BUILD_TESTS=OFF,
--nixl_root, a hard NIXL_ROOT_DIR check, torch LD_LIBRARY_PATH fix
for the transfer-agent-binding stub step, and a PIP_CONSTRAINT unset
for NGC-style base images).
- docker/Dockerfile: installs libzmq3-dev + NIXL (built from source
against the base image's UCX install) so ENABLE_UCX=ON has what it
needs at both build and runtime.
- tools/build-editable-trtllm.sh: new file, ported as-is from opt/dev
(a manual/editable build helper for iterative local development).
- pyproject.toml: bumps the trtllm extra's tensorrt-llm version pin
and flags the apache-tvm-ffi override comment for re-verification.
- tests/unit/tools/test_trtllm_build_backend.py: reads the wheel
version from the backend module instead of hardcoding rc21.
Explicitly NOT ported from opt/dev (out of scope for this bump):
unrelated pyproject.toml drift — vllm 0.26.0->0.25.1 downgrade,
transformer-engine pinned release->git source, modelopt git rev bump,
fla-core/flash-linear-attention override — all separate WIP on that
branch unrelated to the trtllm ref.
Note: uv.lock was not regenerated — `uv lock` currently fails in this
clone because the Automodel/Megatron-Bridge/Gym submodules aren't
checked out (pre-existing, unrelated to this change).
Signed-off-by: Erin Ho <[email protected]>
Retested on GB200 (SLURM job 3126032) after the fixes: all 44 trtllm unit tests pass (was 41 passed / 3 failed). - tests/.../test_trtllm_backend.py: force the manual finalize fallback in test_collective_refit_runs_at_async_engine_boundary via `monkeypatch.setattr(backend.WorkerExtension, "finalize_weight_update", None, raising=False)`. rc28's WorkerExtension now has finalize_weight_update (rc21 didn't), so trtllm_backend.py's _finalize_weight_update silently switched to that fast path and the test's hardcoded call-order assertion (written only for the fallback) started failing. Ported verbatim from the equivalent fix already landing in #4122 (which adds the real finalize_weight_update-aware FP8 refit logic later) — this commit only makes the test deterministic across TRT-LLM versions, it does not implement anything new. - nemo_rl/models/generation/trtllm/trtllm_backend.py: import control_action_decorator from tensorrt_llm.executor.ray.utils (the rc28 location) with a fallback to the old tensorrt_llm._ray_utils path. The old path still works but emits "will be removed in a future release"; fixing now avoids a silent break on the next bump. - uv.lock: regenerated against the bumped ref (was still rc21-era). Resolves cleanly (529 packages), confirms tensorrt/tensorrt-cu13/ tensorrt-cu13-bindings/tensorrt-cu13-libs are no longer pulled in (matches upstream dropping its own tensorrt pin). Note: it resolves torch and nvidia-cudnn-frontend via this repo's override-dependencies (torch==2.11.0+cu130, nvidia-cudnn-frontend==1.25.0) rather than what TRT-LLM's own dependencies actually declare (torch>=2.13.0, nvidia-cudnn-frontend>=1.27.0) — uv's override mechanism forces the version project-wide without validating the sub-dependency is actually satisfied. This is the same conflict already flagged in 3rdparty/TensorRT-LLM-workspace/pyproject.toml's "KNOWN UNRESOLVED CONFLICTS" comment; still unresolved, not addressed by this commit. Signed-off-by: Erin Ho <[email protected]>
Fixes two of three issues flagged by review; the third is documented as a known open item rather than guess-fixed. - tools/build-custom-trtllm.sh: `set -x` (active since the top of the script) was tracing the `git remote add`/`git fetch` commands with $GIT_URL fully expanded, printing any embedded credentials into the build log right next to the redacted echo two lines above -- which defeated the point of that redaction. Wrapped just those two commands in `set +x`/`set -x`. - tools/build-editable-trtllm.sh: this manual/editable build helper (ported verbatim from opt/dev) had drifted from build-custom-trtllm.sh and reintroduced three bugs: `ENABLE_UCX=OFF` (breaks NIXL/PD-disaggregation, the opposite of what this PR sets in the main build script), a missing PyNvVideoCodec requirements.txt strip (pip install fails before cmake runs), and an arch default missing Rubin sm_107. Synced all three to match build-custom-trtllm.sh, including the NIXL_ROOT_DIR existence check and --nixl_root flag now that UCX is on. Also dropped the nvidia-modelopt sed (no-op today, matches the main script). NOT fixed: pyproject.toml's `apache-tvm-ffi==0.1.11` override still wins over TensorRT-LLM's real pin of 0.1.13.post2 (confirmed via uv.lock). Did not blindly bump it -- checked TileLang 0.1.9's PyPI metadata (requires apache-tvm-ffi~=0.1.0, which 0.1.13.post2 would satisfy on paper), but TileLang vendors its own compiled tvm library (tilelang/3rdparty/tvm) loaded via ctypes, so the real ABI compat question can only be answered by an actual GPU-triggered JIT compile, not a pip-install-and-import smoke test. Left as the pre-existing TODO comment; still an open item. Signed-off-by: Erin Ho <[email protected]>
docker/Dockerfile's uv-managed venvs pin torch==2.11.0 (this repo's
override-dependencies), but TRT-LLM's own requirements.txt at the
feat/rl_rc ref pins torch>=2.13.0,<=2.14.0a0. Compiling TRT-LLM
against one torch and running it against the other is a hard C++ ABI
break (confirmed via a real build: `undefined symbol:
...torch::Library::_def...` in libth_common.so at import time), not a
version mismatch uv can resolve around.
Adapted from gitlab-master.nvidia.com/dl/mlperf/optimized's
qwen35_397b_grpo_trtllm/pytorch/Dockerfile, which sidesteps the ABI
break by building on the NGC PyTorch (dlfw) base image and giving the
venv --system-site-packages access to its native torch build, instead
of letting uv manage torch at all. Stripped of everything
MLPerf/SWE-benchmark-specific:
- Dropped stages: swe_setups (OpenHands/SWE-bench/R2E-Gym toolchains),
mlperf (final stage: mlperf-logging, benchmark configs, Qwen3.5
head_dim=256 FA2 monkeypatch, JET result-upload CLI).
- Dropped the gym/megatron-bridge *patch application* (disagg-routing,
SWE-agent fixes, and a Qwen3VL TE-precision finalization patch --
none needed for a generic image).
- Dropped from base: apptainer/singularity (SWE-agent sandboxes only).
- Dropped the private-GitLab-mirror credential-helper logic in
build_trtllm (NVIDIA/TensorRT-LLM on GitHub is public, needs no
auth) and the internal urm.nvidia.com pip mirror ARG.
- Kept the nvidia-nccl-cu13/nvidia-cuda-nvrtc requirements.txt strip
in build_trtllm ("a pip NCCL that differs from the one the base
torch links breaks `import torch`") -- folded into the same
build-custom-trtllm.sh hook this repo already patches.
- Kept the CUTLASS DSL 4.8.0.dev0 and cuDNN Frontend 1.29.0 upgrades:
both are required by 3rdparty/TensorRT-LLM-workspace/pyproject.toml's
own metadata at this ref (independent of Rubin), and the base image
ships older versions of both.
- Kept the release-stage build-time check that actually imports
tensorrt_llm, tensorrt, torch, apex, fused_weight_gradient_mlp_cuda,
and transformer_engine.pytorch, and asserts tensorrt_llm resolves
from the system layer, not the venv -- catches the ABI break at
build time instead of three layers of manual debugging.
- Kept the Megatron-LM submodule bump to 54c62dfb (from our default
pin, 1e7598cb -- confirmed a direct ancestor, so this is a forward
move on the same upstream lineage, not a fork). Includes "Fused GDN
attention support (#6645)", relevant since gated-delta-net kernels
showed up in this repo's own trtllm test runs.
Rubin (sm_107) intentionally out of scope: BUILD_CUSTOM_TRTLLM_ARCH
trimmed to "100-real;103-real" and NVTE_CUDA_ARCHS to "100a;103a"
(both were "...;107a"/"...;107-real" in the source recipe). A wheel
built from this Dockerfile should not be deployed on VR200 hardware
without re-adding Rubin back to both.
Scope: trtllm + mcore + nemo_gym only, one flat --system-site-packages
venv (matches how the source recipe builds it) -- vllm/sglang/
automodel are not available in this image; docker/Dockerfile still
serves those. Not yet built or validated; not wired into CI.
Signed-off-by: Erin Ho <[email protected]>
The NIXL/UCX/libzmq3-dev block added here (from the earlier opt/dev alignment) was only ever in service of making the shared image's trtllm actor venv buildable. It's not sufficient to make it work: that venv is still fully uv-isolated with torch==2.11.0 (no --system-site-packages, no dlfw base), the exact setup that produces the "undefined symbol: ...torch::Library::_def..." ABI crash found via a real build. So keeping it here bought nothing -- the trtllm path in docker/Dockerfile was always going to be broken regardless, and now that docker/Dockerfile.trtllm is the actual working trtllm image, there's no reason to keep the partial, non-functional NIXL/UCX scaffolding in the shared file. docker/Dockerfile is now byte-identical to main. Its existing trtllm-wheel-cache/trtllm-ccache stages and per-actor prefetch loop (pre-existing infrastructure, not something this branch added) are left alone -- ripping those out is a separate, larger, CI-affecting change outside this branch's scope. Signed-off-by: Erin Ho <[email protected]>
docker/Dockerfile's trtllm build resolves torch via uv's normal isolated venv (override-dependencies: torch==2.11.0), but TRT-LLM's own requirements.txt at feat/rl_rc needs torch>=2.13.0,<=2.14.0a0 -- confirmed via a real build to be a hard C++ ABI break, not something uv can resolve around. docker/Dockerfile.trtllm fixes this by inheriting the dlfw base image's native torch instead. - pre-flight: split gb200_functional_test_scripts so L1_Functional_Tests_Trtllm no longer runs against the shared image; new gb200_trtllm_functional_test_scripts/_count outputs carry it separately. - build-container-gb200: added SKIP_TRTLLM_BUILD=1 (pre-existing, already-documented mechanism) so it stops attempting the now-known- broken trtllm build in the shared image. - New build-container-gb200-trtllm job: builds docker/Dockerfile.trtllm (arm64 only, distinct image tag), no trtllm-ccache/wheel-cache-tag since that Dockerfile has no matching cache stages. - New cicd-functional-tests-gb200-trtllm job: runs L1_Functional_Tests_Trtllm against the new image. - test-template: added bare `--env UV_NO_SYNC` to the docker run command. docker/Dockerfile.trtllm bakes UV_NO_SYNC=1 so Ray actor launches never re-sync (protects the inherited native torch from uv trying to reconcile it back to uv.lock's 2.11.0). Test tooling (pytest/coverage) isn't pre-baked, so the new trtllm functional-test job overrides UV_NO_SYNC=0 to let `uv run --group test ...` sync on demand -- the same mechanism every non-trtllm image already relies on, since none of them set UV_NO_SYNC at all. No-op for every other caller (bare --env only forwards a value if the calling job set one; none do). Verified: neither new job appears in any existing job's `needs:`; cicd-functional-tests-gb200's own definition has zero diff, only the script list it consumes changed; both YAML files parse cleanly. Not yet resolved: cicd-unit-tests (pytest -m trtllm) still depends on build-container (H100/amd64), which still attempts the same trtllm build docker/Dockerfile.trtllm exists to route around -- whether the same torch ABI mismatch occurs on amd64 is unverified; we've only tested aarch64/GB200 throughout this work. Also not done: docker/Dockerfile.trtllm's build_trtllm stage uses a plain BuildKit cache mount (not the registry-based ccache/wheel-cache seed+export mechanism build-container-gb200 uses), so every CI run recompiles TRT-LLM from scratch (~60 min) with no cross-run cache. Signed-off-by: Erin Ho <[email protected]>
…nstead docker/Dockerfile's own trtllm build resolves torch via uv's normal isolated-venv resolution (override-dependencies: torch==2.11.0), but TensorRT-LLM's own requirements.txt at the feat/rl_rc ref needs torch>=2.13.0,<=2.14.0a0 -- confirmed via a real build to be a hard C++ ABI break, not something uv can resolve around. There's no reason to keep building a wheel here that can't actually be imported. Removed: - 9 trtllm-only stages: trtllm-wheel-cache-seed, trtllm-ccache-seed, trtllm-wheel-cache-output-base, trtllm-ccache-output-base, trtllm-ccache-export, trtllm-ccache, trtllm-wheel-cache-export, trtllm-wheel-cache, trtllm-cache-export-status. - hermetic stage: SKIP_TRTLLM_BUILD/TRTLLM_CCACHE_MAXSIZE/ TRTLLM_BUILD_JOBS ARGs, the whole TRT-LLM build RUN block (ccache/ wheel-cache mounts, `uv sync --extra trtllm` into a throwaway venv, its log/error handling), and the per-actor prefetch loop's trtllm-stage phase. - release stage: the TRTLLM_WHEEL_CACHE_DIR reuse of the mirrored wheel. - Top-of-file --build-arg SKIP_TRTLLM_BUILD=1 usage doc line. Kept: the `uv lock --check` step and the 3rdparty/TensorRT-LLM-workspace/ COPY it needs (tensorrt-llm is still a [tool.uv.sources] path member of this workspace, so uv needs it present to verify the lock even though nothing builds it here). SKIP_EXTRAS now unconditionally includes "trtllm" so the per-actor venv prefetch never tries to build it, matching how a real ref bump would behave: no version-specific behavior left in this file at all, so there's no "old rc23" (or any other stale ref) to accidentally build. Verified: zero remaining `trtllm`/`TRTLLM` references except the two pointers to docker/Dockerfile.trtllm and the SKIP_EXTRAS line; 6 FROM stages remain (was 15); heredocs balanced (7/7); TARGETARCH/ BASE_IMAGE ARGs confirmed still used elsewhere (not dead code). Signed-off-by: Erin Ho <[email protected]>
docker/Dockerfile no longer builds or caches TRT-LLM (superseded by Dockerfile.trtllm), so its trtllm-ccache/trtllm-wheel-cache stages are gone. build-container (H100) still passed non-empty trtllm-ccache-tag/ trtllm-wheel-cache-tag whenever TRTLLM_BUILD_CACHE=enabled, which would make _build_container.yml try to build those now-missing target stages and hard-fail the H100 container build for every backend. build-container-gb200 was accidentally safe only because SKIP_TRTLLM_BUILD=1 short-circuits _build_container.yml's own cache-resolution step. Remove the cache-tag inputs (and now-vestigial TRTLLM_BUILD_JOBS/SKIP_TRTLLM_BUILD build-args) from both jobs instead of relying on that side effect. Signed-off-by: Erin Ho <[email protected]>
Signed-off-by: Erin Ho <[email protected]>
This MR doesn't need Rubin support. Default arch list is now Blackwell (sm_100) + Blackwell-Ultra (sm_103) only, matching docker/Dockerfile.trtllm's BUILD_CUSTOM_TRTLLM_ARCH, across _backend.py's _DEFAULT_ARCH, build-custom-trtllm.sh, and build-editable-trtllm.sh (including their nvshmem cmake patches). Signed-off-by: Erin Ho <[email protected]>
Signed-off-by: Erin Ho <[email protected]>
…ches - Dockerfile.trtllm: take NeMo-RL source from a nemo-rl build context instead of cloning (Megatron-LM pin kept as MEGATRON_LM_COMMIT); split the venv layer from the source copy; add TRT-LLM ccache/wheel-cache and uv cache seed/export stages matching _build_container.yml; bake the test group; make the CUDA arch lists overridable for H100 (sm_90). - build-custom-trtllm.sh: derive the DeepEP/nvshmem arch list from BUILD_CUSTOM_TRTLLM_ARCH instead of hardcoding 100;103. - CI: tag trtllm images as rl:<tag>-trtllm (new tag-suffix input in _build_container.yml and test-template); add an H100 trtllm build and run L0_Unit_Tests_Trtllm there (keeps L0 coverage), keep L1_Functional_Tests_Trtllm on GB200 only; wire trtllm ccache/wheel/uv caches (per-arch uv-cache-trtllm-<arch> tags, exported on main); restore TRTLLM_BUILD_JOBS (8 on GB200, 24 on H100); run trtllm tests with UV_NO_SYNC=1 since the mounted checkout's pyproject pins Python 3.13. - Remove unused tools/build-editable-trtllm.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Shuyi Xiong <[email protected]>
After rebasing onto main (#4080 moved most extras to torch 2.13.0), the trtllm extra now pins torch==2.13.0/torchvision==0.28.0 to match feat/rl_rc's requirements.txt (torch>=2.13.0,<=2.14.0a0). tensorrt-llm rc28 pins nvidia-cutlass-dsl[cu13]==4.8.0.dev0, whose libs-base/core/cu12/cu13 sub-packages are also 4.8.0.dev0. uv only admits pre-releases requested explicitly, so list them in the trtllm extra. Regenerated with uv 0.11.28 (the version docker/Dockerfile and CI use). Also drop the stale torch==2.11.0 rationale from docker/Dockerfile's header. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Shuyi Xiong <[email protected]>
8553dcf to
13d7278
Compare
…orary)
- _build_container.yml: resolve the uv-cache-tag seed with
`docker buildx imagetools inspect` and only pass the uv-cache-seed
context when the image exists, so a missing cache starts empty instead
of failing the build. The trtllm build jobs no longer hardcode the seed.
- Temporarily export the uv-cache target on PR branches too, so the first
CI run creates rl:uv-cache-trtllm-{amd64,arm64}.
Revert this commit after that run to restore the main-only export and the
hardcoded seed context (matching the non-trtllm uv cache).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Shuyi Xiong <[email protected]>
|
/ok to test e2f4a3d |
e2f4a3d to
13d7278
Compare
|
/review-pr-team |
shuyixiong
left a comment
There was a problem hiding this comment.
Thanks for taking on the rc28 bump. Splitting TRT-LLM into its own dlfw-based docker/Dockerfile.trtllm is the right shape: the base image, Python version and torch source all differ from docker/Dockerfile, and the cache-export stages were moved over rather than copied. The tag-suffix input is also a nice small seam for image variants.
Before merge (details inline):
grpo_trtllm_fsdp2_colocated.shshould fail in the trtllm image becausenemo_automodelisn't installed.- The four new trtllm jobs aren't in
CI_QA_Gate, so a trtllm failure leaves CI green. - The new
uv-cache-trtllm-*seed is required before anything can push it.
Question, not inline: nightly_gb200.txt (L27-28) and release_gb200.txt (L21) list three TRT-LLM-backend recipes, and docker/Dockerfile no longer contains tensorrt_llm. Is the nightly/release launcher switching to the Dockerfile.trtllm image?
Static review only: no GPU environment was available, so none of the trtllm tests were run. The pre-commit lint hooks pass on the changed files.
Generated by Claude Code
| uv sync --locked --inexact --extra trtllm --no-install-project ${NO_INSTALL} | ||
| # --group test: CI runs tests with UV_NO_SYNC=1 (a sync against the mounted, | ||
| # unpatched pyproject.toml cannot find its Python 3.13), so pytest must be baked in. | ||
| uv sync --locked --inexact --extra mcore --extra nemo_gym --group test ${NO_INSTALL} |
There was a problem hiding this comment.
1 action item — please fix in this PR.
TL;DR — grpo_trtllm_fsdp2_colocated.sh should fail in this image with ModuleNotFoundError: No module named 'nemo_automodel', because the image has no automodel env and every actor shares one venv.
PR-introduced: on main, docker/Dockerfile built a separate automodel venv.
L1_Functional_Tests_Trtllmnow runs only on this image and includesgrpo_trtllm_fsdp2_colocated.sh, which usesgrpo_math_1B_trtllm.yaml. That config inheritsdtensor_cfg._v2: true.- That selects
DTensorPolicyWorkerV2, which importsnemo_automodelat module top and is mapped to theautomodelextra. - These two syncs install only
trtllm,mcore,nemo_gymandtest.nemo-automodelisn't reachable from any of them inuv.lock, and the workflow comment says "no vllm/sglang/automodel". NEMO_RL_PY_EXECUTABLES_SYSTEM=1sends every actor, including the automodel ones, to/opt/nemo_rl_venv, so there's no fallback.
The nightly grpo-qwen3-1.7b-2n4g-fsdp2-trtllm recipe takes the same path. Because the trtllm jobs aren't in CI_QA_Gate (see the separate comment), this failure wouldn't turn CI red.
Static analysis only; not run (no GPU environment).
Action: pick one:
- Drop
grpo_trtllm_fsdp2_colocated.shfromL1_Functional_Tests_Trtllmand move the fsdp2 nightly recipe to megatron. - Build a separate automodel venv here, as
docker/Dockerfiledid, instead of forcingNEMO_RL_PY_EXECUTABLES_SYSTEM=1for all actors.
--extra automodel isn't an option here, because pyproject.toml declares it conflicting with trtllm.
| megatron-lm-commit: ${{ needs.pre-flight.outputs.megatron_lm_commit }} | ||
| megatron-lock-artifact: ${{ needs.prepare-megatron-lock.outputs.artifact_name }} | ||
|
|
||
| cicd-unit-tests-trtllm: |
There was a problem hiding this comment.
.github/workflows/cicd-main.yml:889
1 action item — please fix in this PR. None of the four new jobs is in CI_QA_Gate.needs or its ALL_SUCCESS expression:
build-container-gb200-trtllmbuild-container-trtllmcicd-unit-tests-trtllm(this one)cicd-functional-tests-gb200-trtllm
PR-introduced: on main, L0_Unit_Tests_Trtllm / L1_Functional_Tests_Trtllm ran inside cicd-unit-tests / cicd-functional-tests*, which the gate checks.
Result: if the trtllm image fails to build, or a trtllm unit or functional test fails, the gate still passes. The gate also doesn't wait for these jobs to finish.
Action: add all four jobs to CI_QA_Gate.needs. Add ALL_SUCCESS clauses that mirror the existing ones, for example:
(!contains('L0 L1 L2 Lfast', needs.pre-flight.outputs.test_level) || needs.pre-flight.outputs.test_platform == 'gb200' || needs.cicd-unit-tests-trtllm.result == 'success' || needs.cicd-unit-tests-trtllm.result == 'skipped')
Add the GB200 equivalents with the same is_member / DISABLE_GB200_TESTS escape hatches the existing GB200 clauses use.
| uv-cache-tag: ${{ vars.UV_BUILD_CACHE == 'enabled' && 'uv-cache-trtllm-arm64' || '' }} | ||
| build-contexts: | | ||
| nemo-rl=. | ||
| ${{ vars.UV_BUILD_CACHE == 'enabled' && format('uv-cache-seed=docker-image://{0}/{1}:uv-cache-trtllm-arm64', needs.gb200-config.outputs.registry, vars.CI_CONTAINER_NAME) || '' }} |
There was a problem hiding this comment.
.github/workflows/cicd-main.yml:686
1 action item. With UV_BUILD_CACHE == 'enabled', this passes uv-cache-seed=docker-image://…:uv-cache-trtllm-arm64 unconditionally, and the H100 job at L726 does the same for -amd64.
PR-introduced. The chain:
- BuildKit resolves a
docker-image://named context up front and fails the build when the image is missing (namedcontext.go). - The only thing that pushes
uv-cache-trtllm-*is the new main-only export step in_build_container.yml, and it runs after "Build and push" succeeds. - So the first main build fails before it can create the seed. Every later build, PRs included, keeps failing the same way.
The trtllm ccache/wheel seeds already avoid this: _build_container.yml probes them with docker buildx imagetools inspect (resolve_seed) before using them.
If you've already pushed these tags by hand, this won't show up today, but it will again after any registry cleanup.
Action: guard uv-cache-seed the same way resolve_seed guards the other seeds, adding the context only when the tag exists.
|
|
||
| uv venv --seed --system-site-packages --python python3 /opt/nemo_rl_venv | ||
| export VIRTUAL_ENV=/opt/nemo_rl_venv | ||
| uv lock |
There was a problem hiding this comment.
1 action item. TL;DR — this uv lock re-resolves the whole graph during the image build, so the committed uv.lock doesn't pin this image and the trtllm resolution in it has no CI coverage.
PR-introduced.
- The syncs at L261 and L264 pass
--locked, but they only check against the lock generated one line earlier, so--lockedasserts nothing. - Two builds of the same SHA can resolve different versions. The resolved lock isn't saved in the image: the source COPY excludes
uv.lock. - The committed py3.13 trtllm resolution (torch 2.13 from PyPI, cudnn-frontend 1.25.0, apache-tvm-ffi 0.1.11) is what bare-metal
uv sync --extra trtllminstalls, and no job ever installs it.
Action: at minimum, copy the generated lock into the image (e.g. /opt/nemo-rl/uv.trtllm.lock) and log its diff against the committed one. Better: commit the py3.12 lock this image needs and sync it with --frozen, with no re-lock at build time. Also state in the PR description which trtllm environment is supported: this image, bare-metal uv sync --extra trtllm, or both.
| TRTLLM_REF: str = _TRTLLM["ref"] | ||
|
|
||
|
|
||
| def _expanded_trtllm_url(env: dict[str, str]) -> str: |
There was a problem hiding this comment.
3rdparty/TensorRT-LLM-workspace/_backend.py:78
1 action item. Suggest dropping the ${VAR} URL expansion. It has no user, and the redaction built around it doesn't hold.
PR-introduced.
[tool.trtllm].urlis the public GitHub URL. Commit 2d863e8 says the private-mirror auth was deliberately dropped.- The only image that builds TRT-LLM now,
docker/Dockerfile.trtllm, never calls this backend: it reads the url raw and calls the script directly. A${VAR}URL would therefore reach git unexpanded there. - The redaction leaks anyway.
build-custom-trtllm.shruns underset -euxo pipefail, so xtrace prints the expanded URL at the argument check and atGIT_URL=$1, before the redacted echo and theset +x. Reproduced with the script's own lines:+ GIT_URL=https://oauth2:[email protected]/priv/TensorRT-LLM.git
Action: revert L68-101 and L254-273 to main (plain subprocess.run(..., check=True)), and drop the matching redaction echo and set +x in tools/build-custom-trtllm.sh. Re-add it in the PR that introduces a private URL, wired into both build paths, with set +x before the argument check, and with unit tests.
| # | ||
| # The semicolons MUST stay backslash-escaped. This lands inside the | ||
| # CMAKE_CACHE_ARGS list of an ExternalProject_Add, where ';' is CMake's list | ||
| # separator: an unescaped '100;103' would split into two arguments | ||
| # ('-D...STRING=100' plus stray '103') instead of one cache entry | ||
| # holding a two-element list. In the sed replacement below '\\;' emits '\;'. | ||
| NVSHMEM_ARCHS=$(tr ';' '\n' <<<"$ARCH" | sed -E 's/-(real|virtual)$//; s/[af]$//' | paste -sd';') | ||
| assert_patch_target cpp/tensorrt_llm/deep_ep/CMakeLists.txt \ | ||
| '-DCMAKE_CUDA_ARCHITECTURES:STRING=${DEEP_EP_CUDA_ARCHITECTURES}' | ||
| sed -i "s|-DCMAKE_CUDA_ARCHITECTURES:STRING=\${DEEP_EP_CUDA_ARCHITECTURES}|-DCMAKE_CUDA_ARCHITECTURES:STRING=${NVSHMEM_ARCHS//;/'\\;'}|" \ | ||
| cpp/tensorrt_llm/deep_ep/CMakeLists.txt |
There was a problem hiding this comment.
tools/build-custom-trtllm.sh:198-208
1 action item. The escaping comment doesn't match what the code does.
PR-introduced. Bash expands ${NVSHMEM_ARCHS//;/'\\;'} to 100\;103, and sed treats \; in a replacement as a plain ;. The patched line is therefore -DCMAKE_CUDA_ARCHITECTURES:STRING=100;103, with no backslash (checked with bash 5.3 / GNU sed).
It works because ExternalProject folds non--D CMAKE_CACHE_ARGS elements back into the previous variable (ExternalProject.cmake: "Assume this is a list to append to the last var").
Left as is, someone may later "fix" the escaping. The suggestion below produces byte-identical output.
Action:
| # | |
| # The semicolons MUST stay backslash-escaped. This lands inside the | |
| # CMAKE_CACHE_ARGS list of an ExternalProject_Add, where ';' is CMake's list | |
| # separator: an unescaped '100;103' would split into two arguments | |
| # ('-D...STRING=100' plus stray '103') instead of one cache entry | |
| # holding a two-element list. In the sed replacement below '\\;' emits '\;'. | |
| NVSHMEM_ARCHS=$(tr ';' '\n' <<<"$ARCH" | sed -E 's/-(real|virtual)$//; s/[af]$//' | paste -sd';') | |
| assert_patch_target cpp/tensorrt_llm/deep_ep/CMakeLists.txt \ | |
| '-DCMAKE_CUDA_ARCHITECTURES:STRING=${DEEP_EP_CUDA_ARCHITECTURES}' | |
| sed -i "s|-DCMAKE_CUDA_ARCHITECTURES:STRING=\${DEEP_EP_CUDA_ARCHITECTURES}|-DCMAKE_CUDA_ARCHITECTURES:STRING=${NVSHMEM_ARCHS//;/'\\;'}|" \ | |
| cpp/tensorrt_llm/deep_ep/CMakeLists.txt | |
| # | |
| # NVSHMEM_ARCHS is a ';'-separated list (e.g. '100;103'). It lands inside an | |
| # ExternalProject_Add CMAKE_CACHE_ARGS entry, and ExternalProject folds bare list | |
| # elements back into the preceding -D variable, so no escaping is needed. | |
| NVSHMEM_ARCHS=$(tr ';' '\n' <<<"$ARCH" | sed -E 's/-(real|virtual)$//; s/[af]$//' | paste -sd';') | |
| assert_patch_target cpp/tensorrt_llm/deep_ep/CMakeLists.txt \ | |
| '-DCMAKE_CUDA_ARCHITECTURES:STRING=${DEEP_EP_CUDA_ARCHITECTURES}' | |
| sed -i "s|-DCMAKE_CUDA_ARCHITECTURES:STRING=\${DEEP_EP_CUDA_ARCHITECTURES}|-DCMAKE_CUDA_ARCHITECTURES:STRING=${NVSHMEM_ARCHS}|" \ | |
| cpp/tensorrt_llm/deep_ep/CMakeLists.txt |
| # NIXL is what cache_transceiver_backend=DEFAULT resolves to, and it is | ||
| # installed by docker/Dockerfile. Missing means the image is wrong, so fail here | ||
| # rather than shipping a wheel whose default KV transport aborts at runtime. | ||
| NIXL_ROOT_DIR="${NIXL_ROOT_DIR:-/opt/nvidia/nvda_nixl}" | ||
| if [[ ! -f "${NIXL_ROOT_DIR}/include/nixl.h" ]]; then | ||
| echo "[ERROR] NIXL not found at ${NIXL_ROOT_DIR}. The image must install it" \ | ||
| "(see the NIXL_VERSION block in docker/Dockerfile), or point" \ | ||
| "NIXL_ROOT_DIR at an existing install." >&2 |
There was a problem hiding this comment.
tools/build-custom-trtllm.sh:269-276
1 action item. NIXL isn't in docker/Dockerfile (no match there). It's installed by docker/Dockerfile.trtllm.
PR-introduced, and user-facing: this check is new and hard-fails. Anyone running uv sync --extra trtllm outside that image hits it first and is pointed to a block that doesn't exist.
The lines at L162 and L235 also mention "Rubin" artifacts that aren't in this repo.
| # NIXL is what cache_transceiver_backend=DEFAULT resolves to, and it is | |
| # installed by docker/Dockerfile. Missing means the image is wrong, so fail here | |
| # rather than shipping a wheel whose default KV transport aborts at runtime. | |
| NIXL_ROOT_DIR="${NIXL_ROOT_DIR:-/opt/nvidia/nvda_nixl}" | |
| if [[ ! -f "${NIXL_ROOT_DIR}/include/nixl.h" ]]; then | |
| echo "[ERROR] NIXL not found at ${NIXL_ROOT_DIR}. The image must install it" \ | |
| "(see the NIXL_VERSION block in docker/Dockerfile), or point" \ | |
| "NIXL_ROOT_DIR at an existing install." >&2 | |
| # NIXL is what cache_transceiver_backend=DEFAULT resolves to, and it is | |
| # installed by docker/Dockerfile.trtllm. Missing means the image is wrong, so fail here | |
| # rather than shipping a wheel whose default KV transport aborts at runtime. | |
| NIXL_ROOT_DIR="${NIXL_ROOT_DIR:-/opt/nvidia/nvda_nixl}" | |
| if [[ ! -f "${NIXL_ROOT_DIR}/include/nixl.h" ]]; then | |
| echo "[ERROR] NIXL not found at ${NIXL_ROOT_DIR}. The image must install it" \ | |
| "(see the NIXL_VERSION block in docker/Dockerfile.trtllm), or point" \ | |
| "NIXL_ROOT_DIR at an existing install." >&2 |
| # docker/Dockerfile's trtllm build resolves torch via uv's normal isolated-venv | ||
| # resolution (override-dependencies: torch==2.11.0), but TensorRT-LLM's own | ||
| # requirements.txt at the feat/rl_rc ref needs torch>=2.13.0,<=2.14.0a0 -- | ||
| # compiling against one and running against the other is a hard C++ ABI break | ||
| # (confirmed via a real build: "undefined symbol: ...torch::Library::_def..."). | ||
| # docker/Dockerfile.trtllm builds on the NGC PyTorch (dlfw) base image instead | ||
| # and inherits its native torch via --system-site-packages, which resolves it. |
There was a problem hiding this comment.
.github/workflows/cicd-main.yml:635-641
1 action item. This comment's premise is no longer true at this head:
- There's no
override-dependencies: torch==2.11.0; the trtllm extra pinstorch==2.13.0. docker/Dockerfileno longer builds trtllm at all.
The same stale torch==2.11.0 claim appears at L1167-L1168. PR-introduced.
Action: rewrite both comments to give the current reason this job uses the dlfw-based docker/Dockerfile.trtllm.
| # TRT-LLM is not built here -- see docker/Dockerfile.trtllm, which builds it | ||
| # against a dlfw base image's native torch. |
There was a problem hiding this comment.
1 action item. Removing ARG SKIP_TRTLLM_BUILD leaves user docs pointing at an arg that no longer does anything. Nothing documents how to get a TRT-LLM image either. PR-introduced (this PR makes these stale).
SKIP_TRTLLM_BUILDis still documented in:docs/docker.md(L38, L55, L63)docs/guides/nemotron-3-ultra.mdL86, L95docs/guides/nemotron-3.5-lightning.mdL99, L109docs/guides/models/nemotron/nemotron-3-ultra.mdL80, L89docs/guides/models/nemotron/nemotron-3.5-lightning.mdL93, L103.agents/contributor-skills/build-and-dependency/SKILL.md
.github/workflows/_build_container.ymlL153-161 still parses it (now dead code).docs/docker.mdnever mentionsdocker/Dockerfile.trtllm, or the H100 build args from its header (BUILD_CUSTOM_TRTLLM_ARCH=90-real,NVTE_CUDA_ARCHS=90a,TORCH_CUDA_ARCH_LIST=9.0).docker/DockerfileL233-L235 still says "before starting the TRT-LLM build".
Action: drop SKIP_TRTLLM_BUILD from those docs, the skill and _build_container.yml. Add a "TRT-LLM image (docker/Dockerfile.trtllm)" section to docs/docker.md with the build command and arch args, and fix the L233-235 comment.
| # [project].dependencies against the new requirements.txt. | ||
| url = "https://github.com/NVIDIA/TensorRT-LLM.git" | ||
| ref = "bf2ef86f9a2652132b11773d4041e292c553c142" # pragma: allowlist secret | ||
| ref = "f94eeb3738aeacb4bdf9676ba06f620499cdb357" # pragma: allowlist secret |
There was a problem hiding this comment.
3rdparty/TensorRT-LLM-workspace/pyproject.toml:145
1 action item. The PR description no longer matches the branch. Anchoring this here because the description can't be commented on inline.
It says:
- "
uv.lockwas not regenerated": it was, in 13d7278. - Two conflicts "still need to be worked out before
uv lockwill succeed": torch is resolved; cudnn-frontend is covered in the separate comment. - The
nvidia-modeloptpatch intools/build-custom-trtllm.shwas dropped: it's still there (L160-L169), andDockerfile.trtllmanchors on it.
It doesn't mention most of what the PR now does:
- the new
docker/Dockerfile.trtllm, and removing TRT-LLM fromdocker/Dockerfile - the new trtllm build and test jobs in CI
_DEFAULT_ARCHdropping sm_90${VAR}URL expansion- the torch 2.13 bump for the trtllm extra
- the new import path
The template sections are still empty.
Action: rewrite the description to match the final diff. Please include:
- links to green
L0_Unit_Tests_Trtllm/L1_Functional_Tests_Trtllmruns on the new images; - ideally
token_mult_prob_errorand reward from one short existing trtllm GRPO recipe on the new image, since rc28 now delegates the refit finalize step to upstream.
…uild Building docker/Dockerfile.trtllm for GB200/arm64 fails three times over; each is the Dockerfile having drifted from the source tree or the lock. 1. uv venv aborts with "Found conflicting Python requirements: flow-grpo >=3.13.14, <3.14 vs nemo-rl >=3.12, <3.13". The base image is Python 3.12 while upstream pins 3.13, so a block of seds rewrites requires-python across the workspace -- but the list is hard-coded and research/flow_grpo was added to [tool.uv.workspace] without being added here. It also uses the upper-bound spelling, which the existing >=3.13.14 sed does not match, so it needs its own rule rather than another path on the existing one. 2. The uv build fails with "ModuleNotFoundError: No module named 'nemo_rl.transformers_compat'". The release stage copies just __init__.py and package_info.py into nemo_rl/ so that a source-only change can reuse the venv layer, but __init__.py imports transformers_compat at module scope and setuptools executes __init__ to resolve the dynamic version. 3. Importing transformer_engine.pytorch fails with "Could not find `transformer-engine` PyPI package." TE's sanity_checks_for_pypi_installation asserts that if a core package (transformer-engine-cu12/cu13) is installed, the transformer_engine metapackage must be a pure-python wheel. TE here is built from source in build_te as a platform wheel, so the assert only fires because uv sync pulls transformer-engine-cu13 out of the lock: NO_INSTALL excluded transformer-engine and transformer-engine-torch but not the core packages. Exclude those too, matching the stage's intent that TE comes from the build_te wheel alone. Verified by a full arm64 build to the release target on GB200. Co-Authored-By: Claude Opus 5 <[email protected]>
Adopts the trtllm-bump portion of NVIDIA-NeMo#4230 (head 13d7278), excluding the Dockerfile.trtllm split and its CI wiring. - 3rdparty/TensorRT-LLM-workspace/pyproject.toml: [tool.trtllm].ref -> f94eeb37, version -> 1.3.0rc28, dependencies resynced against the new branch's requirements.txt. - 3rdparty/TensorRT-LLM-workspace/_backend.py: ${VAR} URL expansion with credential redaction; _DEFAULT_ARCH -> 90-real;100-real. - tools/build-custom-trtllm.sh: derive the bare nvshmem arch list from ARCH instead of hardcoding it, drop the upstream-removed modelopt patch, add the PyNvVideoCodec strip, NIXL/UCX build flags. Its BUILD_CUSTOM_TRTLLM_ARCH fallback tracks _backend.py's _DEFAULT_ARCH (90-real;100-real): the two must agree, since _backend.py folds the value into the wheel cache key while this script drives the actual compile. - docker/Dockerfile: libzmq3-dev + NIXL built from source, required by ENABLE_UCX=ON. Retained here rather than moved to Dockerfile.trtllm. - pyproject.toml: trtllm extra -> torch 2.13.0 / torchvision 0.28.0 (which feat/rl_rc's requirements.txt now requires), tensorrt-llm 1.3.0rc28, and explicit nvidia-cutlass-dsl-libs-* pre-release pins so uv will admit 4.8.0.dev0. Drops the cuda-python/cuda-bindings <13.4 hold: rc28's _ipc_utils.py no longer reads cudaIpcMemHandle_t.reserved unconditionally. - nemo_rl/utils/cuda_ipc.py: docstring only -- TRT-LLM is no longer a torch 2.11 consumer, so it can open expandable-segment handles. - uv.lock: regenerated for rc28 on torch 2.13. Not adopted from NVIDIA-NeMo#4230: docker/Dockerfile.trtllm, the docker/Dockerfile TRT-LLM removal that pairs with it, .github/** CI wiring, and the tests/unit/L0_Unit_Tests_Trtllm.sh switch to the new image. Co-authored-by: Erin Ho <[email protected]> Signed-off-by: shuyixiong <[email protected]>
|
Cloasing this as we moved to #4358. |
Adopts the trtllm-bump portion of #4230 (head 13d7278), excluding the Dockerfile.trtllm split and its CI wiring. - 3rdparty/TensorRT-LLM-workspace/pyproject.toml: [tool.trtllm].ref -> f94eeb37, version -> 1.3.0rc28, dependencies resynced against the new branch's requirements.txt. - 3rdparty/TensorRT-LLM-workspace/_backend.py: ${VAR} URL expansion with credential redaction; _DEFAULT_ARCH -> 90-real;100-real. - tools/build-custom-trtllm.sh: derive the bare nvshmem arch list from ARCH instead of hardcoding it, drop the upstream-removed modelopt patch, add the PyNvVideoCodec strip, NIXL/UCX build flags. Its BUILD_CUSTOM_TRTLLM_ARCH fallback tracks _backend.py's _DEFAULT_ARCH (90-real;100-real): the two must agree, since _backend.py folds the value into the wheel cache key while this script drives the actual compile. - docker/Dockerfile: libzmq3-dev + NIXL built from source, required by ENABLE_UCX=ON. Retained here rather than moved to Dockerfile.trtllm. - pyproject.toml: trtllm extra -> torch 2.13.0 / torchvision 0.28.0 (which feat/rl_rc's requirements.txt now requires), tensorrt-llm 1.3.0rc28, and explicit nvidia-cutlass-dsl-libs-* pre-release pins so uv will admit 4.8.0.dev0. Drops the cuda-python/cuda-bindings <13.4 hold: rc28's _ipc_utils.py no longer reads cudaIpcMemHandle_t.reserved unconditionally. - nemo_rl/utils/cuda_ipc.py: docstring only -- TRT-LLM is no longer a torch 2.11 consumer, so it can open expandable-segment handles. - uv.lock: regenerated for rc28 on torch 2.13. Not adopted from #4230: docker/Dockerfile.trtllm, the docker/Dockerfile TRT-LLM removal that pairs with it, .github/** CI wiring, and the tests/unit/L0_Unit_Tests_Trtllm.sh switch to the new image. Co-authored-by: Erin Ho <[email protected]> Signed-off-by: shuyixiong <[email protected]>
Switches the custom-built TRT-LLM wheel from commit bf2ef86f (1.3.0rc21) to NVIDIA/TensorRT-LLM@feat/rl_rc, commit f94eeb37 (1.3.0rc28).
uv lockwill succeed.Note: uv.lock was not regenerated —
uv lockcurrently fails in this clone because the Automodel/Megatron-Bridge/Gym submodules aren't checked out (pre-existing, unrelated to this change).What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information