Skip to content

Ask for nvidia-npp on CUDA 13, not the retired nvidia-npp-cu13 stub - #10589

Closed
danielhanchen wants to merge 1 commit into
mainfrom
npp-cu13-deprecated
Closed

danielhanchen wants to merge 1 commit into
mainfrom
npp-cu13-deprecated

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

main currently cannot complete a clean install on aarch64. The linux ubuntu2404-arm-root leg of Clean machine install has been failing on main itself, with no PR involved:

  • run 34255272305 at 5177a5b1d, sole failing job linux ubuntu2404-arm-root
  • the same job fails the same way on every PR branch that inherits it

The failing step:

   Building nvidia-npp-cu13==0.0.1
  x Failed to build `nvidia-npp-cu13==0.0.1`
  |-> The build backend returned an error
  `-> Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stderr]
      THIS PROJECT 'nvidia-npp-cu13' IS DEPRECATED.
      Please use 'nvidia-npp' instead.

##[error]built from source: nvidia-npp-cu13 -- these must resolve to wheels on a clean machine

Cause

NVIDIA retired the per-major nvidia-npp-cuNN names at CUDA 13. nvidia-npp-cu13 on PyPI is now a deprecation stub: its only release, 0.0.1 (uploaded 2025-10-31), publishes no wheel at all, only an sdist whose build backend raises on purpose. So the torchcodec NPP step does not merely miss the package, it attempts a source build and fails, and the clean-machine assertion rejects the source build outright.

It bites aarch64 only, which is why the break is easy to miss:

  • torchcodec>=0.11.0,<0.12.0 has no aarch64 wheel on download.pytorch.org/whl/cpu, so the installer falls back to the default index and lands the generic torchcodec==0.11.1, which links CUDA 13.
  • The NPP step then computes major 13 and asks for nvidia-npp-cu13.
  • On x86_64 the pinned torchcodec resolves from the pytorch index and the NPP step is never reached at all.

aarch64 is DGX Spark, so this affects every Spark install, not just CI.

Fix

Add _npp_requirement, one place that maps a CUDA major to the distribution that actually exists:

  • CUDA 12 and earlier keep nvidia-npp-cu{major}, which is still published and current (nvidia-npp-cu12 12.4.1.87).
  • CUDA 13 and later ask for nvidia-npp>={major},<{major+1}. The replacement distribution's own major is the CUDA major, so the major moves out of the name and into the specifier. Bounded above so a future CUDA 14 wheel cannot satisfy a CUDA 13 torch.
  • No major still means no NPP, so the caller's existing cpu/rocm guard is unchanged.

docker/Dockerfile is untouched: it installs nvidia-npp-cu12, which is on the unchanged branch.

Verification

nvidia-npp 13.1.2.81 publishes the wheels this needs, including aarch64:

nvidia_npp-13.1.2.81-py3-none-manylinux_2_27_aarch64.whl
nvidia_npp-13.1.2.81-py3-none-manylinux_2_27_x86_64.whl
nvidia_npp-13.1.2.81-py3-none-win_amd64.whl

Installed on an aarch64 GB10 host, it lays down exactly the libraries torchcodec's CUDA build dlopens, under nvidia/cu13/lib/: libnppc, libnppif, libnppig, libnppim, libnppist, libnppisu, libnppitc, all .so.13.

Resolution on aarch64, for contrast:

nvidia-npp>=13,<14  ->  nvidia-npp==13.1.2.81      (wheel)
nvidia-npp-cu12     ->  nvidia-npp-cu12==12.4.1.87 (wheel)
nvidia-npp-cu13     ->  nvidia-npp-cu13==0.0.1     (sdist stub, build raises)

Tests

test_cuda_13_asks_for_nvidia_npp_not_the_retired_cu13_name covers the mapping in both directions, that the retired name cannot appear for major 13 or later, that the range is bounded above, and that an empty major still asks for nothing. test_a_cuda_index_codec_also_installs_npp is updated to the new call site. Both fail against the current main and pass here; the file's other 88 tests are unchanged and still pass.

Minimal and self-contained: this only explains the red aarch64 CI seen on other branches, it does not depend on any of them.

NVIDIA retired the per-major nvidia-npp-cuNN names at CUDA 13. nvidia-npp-cu13 on
PyPI is now a deprecation stub: its only release, 0.0.1, ships no wheel and its sdist
build backend raises on purpose, printing "THIS PROJECT 'nvidia-npp-cu13' IS
DEPRECATED. Please use 'nvidia-npp' instead". So the torchcodec NPP step did not skip,
it attempted a source build and failed, and the clean-machine job rejects the source
build outright.

That currently breaks the aarch64 install path on main. torchcodec has no aarch64
wheel on download.pytorch.org, so the installer falls back to the default index and
lands the generic wheel, which links CUDA 13; the NPP step then asks for
nvidia-npp-cu13. On x86_64 the pinned torchcodec resolves from the pytorch index and
the step is never reached, which is why only the ARM leg is red.

Add _npp_requirement: CUDA 12 and earlier keep nvidia-npp-cu{major}, which is still
published, and CUDA 13 and later ask for nvidia-npp>={major},<{major+1}, whose own
major is the CUDA major. Bounded above so a future CUDA 14 wheel cannot satisfy a
CUDA 13 torch. nvidia-npp 13.1.2.81 publishes manylinux_2_27_aarch64, x86_64 and
win_amd64 wheels.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T06:51:06.571117Z ca7723d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

Independent corroboration from the #10280 side, where this leg is the only red check. I reached the same root cause separately, before seeing this PR, which is worth stating plainly: two unrelated investigations converging on it is stronger evidence than either alone.

The same linux ubuntu2404-arm-root job fails with the identical line on main, at two commits neither of which is a feature branch:

  • abf4d33d5 -- run 34273194035, job 102219717051
  • 5177a5b1d -- run 34255272305, job 102159359067

both ending ##[error]built from source: nvidia-npp-cu13 -- these must resolve to wheels on a clean machine, out of the "Assert no source build" step. I ruled out the two explanations that usually look like this on this repo before concluding: neither run was cancelled and rendered as a failure, and neither is pre-commit.ci erroring during the mergeable check.

The half I would add to the write-up. On PyPI nvidia-npp-cu13 has exactly two releases, and the artifacts are:

  • 0.0.0a0: nvidia_npp_cu13-0.0.0a0.tar.gz plus nvidia_npp_cu13-0.0.0a0-py2.py3-none-any.whl
  • 0.0.1: nvidia_npp_cu13-0.0.1.tar.gz, and nothing else

0.0.1 publishes no wheel for any platform. So the name the installer asks for must be built from source wherever it is resolved, and the assertion fails by construction everywhere rather than only on aarch64; an x86 clean-machine leg would hit it too if it ran this step. That is the complement to your angle, which is why aarch64 reaches it at all -- torchcodec having no aarch64 wheel on the pytorch index, so the fallback pulls the CUDA-13-linked generic wheel.

The upper bound on nvidia-npp>={major},<{major+1} is the right call: an unbounded pin would let a future CUDA 14 wheel satisfy a CUDA 13 torch, which is the same class of silent mismatch as the stub.

@danielhanchen

Copy link
Copy Markdown
Member Author

Duplicate of #10587, which is older and covers two cases this one does not: the silent --only-binary path that installs the 0.0.0a0 placeholder, and the fact that the suffix drop is false for nvidia-cudnn and nvidia-nccl. Closing in favour of it. Evidence from here, including the staging run where linux ubuntu2404-arm-root goes green, is posted on #10587.

@danielhanchen
danielhanchen deleted the npp-cu13-deprecated branch September 9, 2026 07:14
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