Page MenuHome

Cycles: Add CUDA 11 build support
ClosedPublic

Authored by Patrick Mours (pmoursnv) on Oct 12 2020, 6:19 PM.

Details

Summary

This patch is based on D8063 and rBf63da3dcf59f87b34aa916b2c65ce5a40a48fd92.
In order to build binary kernels for Ampere the CUDA toolkit needs to be updated to CUDA 11.1 (which adds sm_86 support). That toolkit drops support for sm_30 though, so need to continue building that using CUDA 10.

With this patch the build system checks whether the "CUDA10_NVCC_EXECUTABLE" CMake variable is set and if so will use that to build sm_30 kernels. Similarily for sm_8x kernels it checks "CUDA11_NVCC_EXECUTABLE". All other kernels are built using the default CUDA toolkit.
This makes it possible to use either the CUDA 10 or CUDA 11 toolkit by default and only seletively use the other for the kernels where its a hard requirement. In case only the CUDA 11 toolkit is installed, the build system will simply skip sm_30 kernels. Same with only the CUDA 10 toolkit, but for sm_8x kernels.
The sm_35 and sm_50 architectures still build with CUDA 11, albeit being deprecated, so I left them as is for now.

Diff Detail

Repository
rB Blender
Branch
cycles_cuda11 (branched from master)
Build Status
Buildable 10703
Build 10703: arc lint + arc unit

Event Timeline

Patrick Mours (pmoursnv) requested review of this revision.Oct 12 2020, 6:19 PM
Patrick Mours (pmoursnv) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Oct 12 2020, 7:35 PM
Brecht Van Lommel (brecht) added inline comments.
build_files/buildbot/worker_compile.py
50–58

We have CUDA 10.1 installed on Linux and Windows, not 10.2.

This revision now requires changes to proceed.Oct 12 2020, 7:35 PM

Changed buildbot configuration to use CUDA 10.1 instead of CUDA 10.2

Patrick Mours (pmoursnv) marked an inline comment as done.Oct 13 2020, 12:34 PM
This revision is now accepted and ready to land.Oct 13 2020, 12:42 PM
This revision was automatically updated to reflect the committed changes.