Skip to content

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

Description

@jfpanisset

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions