AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage

[BUILD] CUDA 13 drops support for pre-Turing architectures

Open
#2,132 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
414
Avg merge
3d 1h
Merged PRs (30d)
10

Description

While trying to build OSL 1.15.5.0 with LLVM 22.1.7 and CUDA 13.3.0 I got the following build failure:

```
nvcc fatal : Unsupported gpu architecture 'sm_60'
```

when trying to build:

```
src/testshade/optix_grid_renderer.ptx
src/testrender/optix_raytracer.ptx
```

`CMakeLists.txt` has:

```
set (CUDA_TARGET_ARCH "sm_60" CACHE STRING "CUDA GPU architecture (e.g. sm_50)")
```

which calls for Pascal architecture. I updated my Conan recipe to set that to "sm_75" (Turing) when detecting CUDA 13 or newer, I don't know if OSL makes any claims about CUDA 13 compatibility yet, but it might be good to have `CMakeLists.txt` adjust the baseline GPU architecture based on the detected CUDA version?

Contributor guide

Open the contributing guide

Research direction

Start in CMakeLists.txt at the CUDA_TARGET_ARCH definition and trace how the CUDA version and PTX targets are configured for src/testshade/optix_grid_renderer.ptx and src/testrender/optix_raytracer.ptx. Reproduce the failure with CUDA 13.3.0, then verify the configuration works for CUDA 13 while preserving the intended behavior for older CUDA versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.