Repository navigation
deepseek-v4: CUDA_ARCH=portable-pre-ampere needs CUDA <= 12.9; say so where the preset is recommended - #2760
Merged
JustVugg merged 1 commit intoNov 13, 2026
Conversation
…it is recommended The preset's gencode list starts at compute_61, which CUDA 13 dropped (nvcc 13 lists compute_75 first), so nvcc stops at once with "Unsupported gpu architecture 'compute_61'". The loader's no-usable-DLL message, the backend's no-kernel-image reason, resource_plan's CUDA_TIER_FLOOR hint, Makefile.deepseek-v4 and docs/deepseek-v4.md all sent Pascal and Turing users to the preset without that limit. They now say "CUDA <= 12.9"; the Makefile comment and the doc add that a Turing card builds on CUDA 13 with CUDA_ARCH=sm_75 NO_TC=1. A test reads the preset's oldest compute_XX from Makefile.deepseek-v4, takes the last release that builds it from setup_flow.CUDA_RELEASES (the measured nvcc table) and checks every hint names that limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
risner
pushed a commit
to risner/colibri
that referenced
this pull request
Nov 13, 2026
…9 too JustVugg#2755 added the row and JustVugg#2760 the check that every place recommending the portable-pre-ampere preset names the last toolkit that builds it.
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.
deepseek-v4: CUDA_ARCH=portable-pre-ampere needs CUDA <= 12.9; say so where the preset is recommended
Summary
When the DeepSeek V4 GPU tier cannot use a Pascal or Turing card, the loader, the backend,
resource_plan.pyand the docs all point the user toCUDA_ARCH=portable-pre-ampere NO_TC=1. That preset's gencode list starts atcompute_61, which CUDA 13 dropped. With a CUDA 13 toolkit, nvcc stops at once, and none of these hints mention the toolkit limit. This PR adds "CUDA <= 12.9" to every place that recommends the preset. The Makefile comment and the doc also say that a Turing card builds on CUDA 13 withCUDA_ARCH=sm_75 NO_TC=1. A test keeps the hints and the measured nvcc table insetup_flow.pyin step.It complements #2755, which adds the same preset to
c/Makefilefor the Windows DLL. Code and build flags are unchanged: only message strings, comments and docs change.Problem on dev (d138de3)
c/Makefile.deepseek-v4:164-175: theportable-pre-amperegencode list iscompute_61, 75, 80, 86, 89, 90pluscompute_90PTX. The comment explains whyNO_TC=1is needed (cuBLASLt needs CUDA >= 12.8), but says nothing about an upper toolkit bound. The summary at:132-133has the same gap.c/setup_flow.py:186-197(CUDA_RELEASES, measured from NVIDIA's own nvcc) already records it:((12, 9), 50, 121), then((13, 0), 75, 121).tests/test_setup_flow.pykeeps the realnvcc --list-gpu-archof 13.0.88 and 13.4.92, and both start atcompute_75.With the CUDA 13.4 toolkit on this machine, the preset's own flags fail before any compilation:
These places send Pascal and Turing users to the preset with no toolkit limit:
c/backend_loader_dsv4.c:462-464, theno usable backend DLLmessage;c/backend_cuda_dsv4.cu:1831, theno kernel imagereason for a card below sm_80;c/resource_plan.py:2931, theCUDA_TIER_FLOORhint that the plan prints as a warning (Findings on Zen2/Windows with DS4F REAP-150B (v1.12.1): SMT thread default, non-monotonic --ram, cross-build token divergence (+#1136), and a few docs/UX items #1906);docs/deepseek-v4.md:569and the table row at:590.Fix
c/Makefile.deepseek-v4: the summary at:133says the preset needsNO_TC=1and CUDA <= 12.9. A new paragraph in the preset block says why: CUDA 13 droppedcompute_61, and nvcc stops withUnsupported gpu architecture 'compute_61'. With CUDA 13, a Turing card builds withCUDA_ARCH=sm_75 NO_TC=1.c/backend_loader_dsv4.c: the message now endsCUDA_ARCH=portable-pre-ampere NO_TC=1 and CUDA <= 12.9 (docs/deepseek-v4.md).c/backend_cuda_dsv4.cu: for a card below sm_80, theno kernel imagereason now suggestsCUDA_ARCH=portable-pre-ampere NO_TC=1 with CUDA <= 12.9.c/resource_plan.py: the hint now readsa build with CUDA_ARCH=portable-pre-ampere NO_TC=1 (CUDA <= 12.9) runs on Pascal and Turing. The existing Findings on Zen2/Windows with DS4F REAP-150B (v1.12.1): SMT thread default, non-monotonic --ram, cross-build token divergence (+#1136), and a few docs/UX items #1906 test only checks forsm_61andportable-pre-ampere, so it still passes.docs/deepseek-v4.md: the "GPU coverage" paragraph names the limit, the nvcc error and the sm_75 route on CUDA 13. The table row addsCUDA <= 12.9.c/tests/test_deepseek_v4_cuda_arch_flags.py: newPreAmperePresetToolkitTest. It reads files only, so it needs no make, no CUDA and no POSIX shell, and it runs on Windows too. It:compute_XXof the preset fromMakefile.deepseek-v4;setup_flow.CUDA_RELEASES(12.9), and checks that a newer release dropped it;CUDA <= 12.9in the preset block, inCUDA_TIER_FLOOR, and right after everyportable-pre-ampere NO_TC=1in the loader, the backend and the doc.If a later toolkit row or preset change moves the limit, the test names each hint that is out of date.
No Makefile auto-detection was added on purpose. The Linux
CUDA=1block already readsnvcc --versiononly for the>= 12.8check, and that check is skipped withNO_TC=1, which this preset requires. nvcc's own error is clear once the hint says which toolkit to use.Tests
Windows 11, MSYS2 UCRT64 gcc 16.2, Python 3.14,
PYTHONUTF8=1, fromc/:python -m unittest tests.test_deepseek_v4_cuda_arch_flags.PreAmperePresetToolkitTestfails in all five subtests, one per hint, each withrecommends the preset without 'CUDA <= 12.9'. For example:'a build with CUDA_ARCH=portable-pre-ampere NO_TC=1 runs on Pascal and Turing'(resource_plan.CUDA_TIER_FLOOR);'portable-pre-ampere NO_TC=1 (docs/deepseek-v4.md).\n", ...'(backend_loader_dsv4.c);'portable-pre-ampere NO_TC=1":"portable"); ...'(backend_cuda_dsv4.cu);docs/deepseek-v4.md).python -m unittest tests.test_resource_plan tests.test_deepseek_v4_cuda_arch_flags tests.test_deepseek_v4_build_flags tests.test_makefile_platform: 155 tests OK, 25 skipped. The skips are the POSIX-only fake-nvcc tests.python -m unittest tests.test_setup_flow.CudaToolkit: 6 tests OK. This is the measured nvcc table the new test reads.make -f Makefile.deepseek-v4 deepseek-v4(CPU build, which on Windows compilesbackend_loader_dsv4.o): OK.deepseek_v4.execontains... take a build with CUDA_ARCH=portable-pre-ampere NO_TC=1 and CUDA <= 12.9 (docs/deepseek-v4.md).backend_cuda_dsv4.cuwith the changed string, compiled with CUDA 13.4 + MSVC (VS 18 BuildTools) asnvcc -O3 -std=c++17 -arch=sm_75 -DCOLI_DSV4_NO_TC --expt-relaxed-constexpr --expt-extended-lambda -Xcompiler=/Zc:preprocessor -c backend_cuda_dsv4.cu: exit 0, andcuobjdump --list-elflistssm_75. This backs the doc's "with CUDA 13, Turing builds withCUDA_ARCH=sm_75 NO_TC=1". It was a compile check only: no Turing card was run here.Risks
fprintfand asnprintfinto the caller'swhybuffer, which truncates as before.12.9bound comes fromsetup_flow.CUDA_RELEASES. If NVIDIA ever ships a 12.10, that table needs a row first, and the new test then reports the hints that need the new number.README.*.md, line ~405 in English) still give the preset without the limit. Their paragraph already says that a CUDA 12.x toolkit brings the CUDA path back for older cards, so they were left alone to keep the translations in step.Related open PRs
c/Makefileformake cuda-dsv4-dllon Windows. The two branches merge cleanly (git merge-tree). The hint added here applies to that build too.DSV4_GPU_HINTmacro. It already conflicts with dev, and with this branchc/backend_loader_dsv4.cis one more file in that conflict. To resolve it, keep DeepSeek V4: native HIP tier and --gpu/--vram on it (RX 7600M XT, 8 GB) #2603's macro and addand CUDA <= 12.9. The new test catches it if that is missed.git merge-treeconflict list is the same against dev and against this branch.🤖 Generated with Claude Code