CUDA 13.x API compatibility - #490
Open
MozillaFiredoge wants to merge 2 commits into
Open
Conversation
MozillaFiredoge
force-pushed
the
fix-cuda-13-2
branch
2 times, most recently
from
May 20, 2026 14:05
6a33c19 to
82bdd22
Compare
Signed-off-by: Firedoge <201348850@qq.com>
Signed-off-by: Firedoge <201348850@qq.com>
MozillaFiredoge
force-pushed
the
fix-cuda-13-2
branch
from
May 20, 2026 14:50
82bdd22 to
126212f
Compare
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.
Summary
This PR updates the PhysX GPU source build for CUDA 13.x compatibility.
CUDA Toolkit 13.0 removed offline compilation and library support for pre-Turing architectures, including Volta /
sm_70, so the default GPU architecture list should no longer emitsm_70SASS when building with CUDA 13.x.CUDA 13.x also changed several generated host-side CUDA entry points and Driver API signatures used by the PhysX GPU build. Since PhysX intentionally avoids linking against CUDART and provides local CUDA runtime stubs in
CudaKernelWrangler.cpp, this PR adds the missing CUDA 13.x runtime stub symbols instead of linkingcudart_static.Changes
sm_70SASS generation when building with CUDA 12.x.sm_70only when building with CUDA 13.x or newer, because CUDA 13.0 removed offline compilation support for pre-Turing architectures.__cudaLaunchKernel__cudaGetKernelcuCtxCreatecall for the CUDA 13.x Driver API signature.Motivation
When building
PhysXGpuwith CUDA Toolkit 13.2 on Windows / MSVC, the build currently fails with unresolved external symbols emitted by CUDA-generated host stubs, for example:Linking against
cudart_staticis not a suitable fix becauseCudaKernelWrangler.cppalready defines several CUDA runtime shim symbols, which causes duplicate symbol errors such as__cudaRegisterFatBinary,__cudaRegisterFunction, andcudaLaunchKernel.Keeping these symbols in
CudaKernelWrangler.cpppreserves the existing PhysX design of resolving CUDA-generated runtime dependencies without linking the full CUDA runtime.Validation
Tested locally with:
PhysXGpubuilds past the previous CUDA 13.x link errors