Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions physx/source/compiler/cmakegpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,15 @@ SET(SOURCE_DISTRO_FILE_LIST "")
# since that's the default set in: compiler\internal\CMakeLists.txt (using CMAKE_CUDA_ARCHITECTURES)
# see policy CMP0104
IF(PX_GENERATE_GPU_REDUCED_ARCHITECTURES)
GENERATE_ARCH_CODE_LIST(SASS "80,86,89,90,100,120" PTX "120")
ELSE()
# Volta is the minimum compute arch required because NGC supports V100
GENERATE_ARCH_CODE_LIST(SASS "70,80,86,89,90,100,120" PTX "120")
IF(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 13.0)
# CUDA 12.x still supports offline compilation for Volta / sm_70.
SET(PHYSX_GPU_SASS_ARCHS "70,80,86,89,90,100,120")
ELSE()
# CUDA 13.x removed offline compilation support for pre-Turing architectures.
SET(PHYSX_GPU_SASS_ARCHS "80,86,89,90,100,120")
ENDIF()

GENERATE_ARCH_CODE_LIST(SASS "${PHYSX_GPU_SASS_ARCHS}" PTX "120")
ENDIF()

# Force response files off because clangd does not parse them
Expand Down
7 changes: 6 additions & 1 deletion physx/source/cudamanager/src/CudaContextManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,12 @@ CudaCtxMgr::CudaCtxMgr(const PxCudaContextManagerDesc& desc, PxErrorCallback& er
return;
}

status = cuCtxCreate(&mCtx, (unsigned int)flags, mDevHandle);
#if CUDA_VERSION >= 13000
status = cuCtxCreate(&mCtx, nullptr, (unsigned int)flags, mDevHandle);
#else
status = cuCtxCreate(&mCtx, (unsigned int)flags, mDevHandle);
#endif

if (CUDA_SUCCESS != status)
{
const size_t bufferSize = 128;
Expand Down
18 changes: 18 additions & 0 deletions physx/source/cudamanager/src/CudaKernelWrangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,24 @@ void CUDARTAPI __cudaRegisterFunction(void** fatCubinHandle, const char*,

/* These functions are implemented just to resolve link dependencies */

extern "C"
cudaError_t CUDARTAPI __cudaLaunchKernel(
const void*,
dim3,
dim3,
void**,
size_t,
cudaStream_t)
{
return cudaSuccess;
}

extern "C"
const void* CUDARTAPI __cudaGetKernel(const void* func)
{
return func;
}

extern "C"
cudaError_t CUDARTAPI cudaLaunch(const char* entry)
{
Expand Down