"ptx (-ptx) is not allowed" error when CUDA_ARCHITECTURES=all
nnn911 opened this issue · comments
When building the next_release branch on Windows setting CMAKE_CUDA_ARCHITECTURES=all
I encounter the following error:
[1/28] Building CUDA object devices\rtx\CMakeFiles\AmbientOcclusion_ptx.dir\renderer\AmbientOcclusion_ptx.ptx
...
nvcc fatal : Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures
This can be circumvented setting CMAKE_CUDA_ARCHITECTURES=native
, which is fine for testing, however, CMAKE_CUDA_ARCHITECTURES=all
would be required for deployment.
CMake Command
PS ~> cmake -G "Ninja" `
-DCMAKE_INSTALL_PREFIX="../../anari" `
-DCMAKE_BUILD_TYPE=Release `
-Danari_DIR="../../anari/lib/cmake/anari-0.8.0" `
-DOptiX7_ROOT_DIR="../../NVIDIA Corporation/OptiX SDK 7.6.0" `
-DVISRTX_BUILD_INTERACTIVE_EXAMPLE=OFF `
-DCMAKE_CUDA_COMPILER="../../NVIDIA GPU Computing Toolkit/CUDA/v12.3/bin/nvcc.exe" `
-DVISRTX_BUILD_GL_DEVICE=OFF `
-DCMAKE_CUDA_ARCHITECTURES=all `
-DVISRTX_BUILD_EXAMPLES=OFF `
..
System Information
- Windows 11
- MSVC: 14.37.32822:
Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
- nvcc --version:
Copyright (c) 2005-2023 NVIDIA Corporation Built on Fri_Sep__8_19:56:38_Pacific_Daylight_Time_2023 Cuda compilation tools, release 12.3, V12.3.52 Build cuda_12.3.r12.3/compiler.33281558_0
- OptiX SDK 7.6.0
I think this is addressed now on next_release
. Please reopen if you continue to have issues, thanks!