docker: remove the base image's apt cuDNN so the pip one is what loads - #1824
Open
yueming-yuan wants to merge 2 commits into
Open
docker: remove the base image's apt cuDNN so the pip one is what loads#1824yueming-yuan wants to merge 2 commits into
yueming-yuan wants to merge 2 commits into
Conversation
The apt copy shadows the pip copy in ldconfig, and the loader interleaves the two: libcudnn_heuristic.so.9 comes from apt while libcudnn_graph.so.9 comes from pip. transformer_engine then fails either on import with an undefined symbol or inside fused attention with CUDNN_STATUS_BAD_PARAM, which is why moving the pip pin alone changed nothing. Verified on radixark/miles:pr-1795@sha256:792974ed with 8 DotProductAttention forward+backward configs (d=64/128 x MHA/GQA x sbhd/bshd): apt present + pip 9.16.0.29 -> torch refuses to init cuDNN apt present + pip 9.22.0.52 -> 8/8 fail apt removed + pip 9.19.0.56 -> 8/8 fail (the version floor is real) apt removed + pip 9.22.0.52 -> 8/8 pass
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1808. That PR raised the pip cuDNN pin to 9.22.0.52, which is
necessary but not sufficient — on current main the failure it targeted still
reproduces.
The pin was inert
The base image carries cuDNN as apt packages (
libcudnn9-cuda-139.13.0.50-1,plus
-dev-and-headers-) in/usr/lib/x86_64-linux-gnu, andldconfigresolves the sonames there ahead of the pip copy in
.../dist-packages/nvidia/cudnn/lib. The loader then interleaves the two:libcudnn_heuristic.so.9comes from the apt build whilelibcudnn_graph.so.9comes from the pip build. Depending on load order transformer_engine dies either
at import with that undefined symbol, or later inside fused attention with the
CUDNN_ATTR_OPERATION_RESHAPE_MODECUDNN_STATUS_BAD_PARAMthat #1808 set outto fix. Either way, moving the pip pin alone changes nothing — the pip build is
not what gets loaded.
The apt packages are held (
hiindpkg -l), so the removal needs--allow-change-held-packages. Without that flag apt reports the plan and skips,leaving everything in place.
Measurements
On
radixark/miles:pr-1795@sha256:792974ed(H200), 8te.DotProductAttentionforward+backward configs — d=64/128 × MHA(8/8)/GQA(8/2) × sbhd/bshd, bf16, causal,
NVTE_FUSED_ATTN=1:BAD_PARAMatfused_attn_f16_arbitrary_seqlen.cu:934Row 3 is why the pin stays at 9.22.0.52 rather than being dropped: with the
conflict gone, torch's own bundled 9.19.0.56 still fails, so #1808's version
floor is real. Both halves are required.
Removing the apt packages breaks nothing else — the
libc10.so/libtorch_*.so"not found" that
lddreports for the apex extensions is pre-existing andidentical before and after, and
holoscan-cuda-13was not pulled in by theremoval.
Scope
ENABLE_CUDA_13=1is the default and what CI builds for both architectures, sothe cu13 path is what the measurements above cover. The cu12 branch is written
symmetrically;
libcudnn9-cuda-12,libcudnn9-dev-cuda-12andlibcudnn9-headers-cuda-12all exist in the NVIDIA repo (9.24/9.25), but thecu12-x86variant was not built as part of this work.Fixes the two LoRA tests that fail on #1795
(
test_lora_qwen2.5_0.5B,test_qwen3_5_35b_a3b_lora_ci);test_dumper'stimeout is plausibly the same cause and is worth re-checking once this lands.