This adds support for CUDA 11, but still checks for CUDA 12 in the main cmake config. The few places in the CUDA code where CUDA12-specific features are used are behind #include guards.
The patches in the patches/ dir need to be applied to the recursively checked out repository, as we need to patches to the glad, tiny-cuda-nn and pybind11 source repos in include/.
~~The first is needed as a shared library (and so the Python module) on Linux requires the code in the tiny-cuda-nn library to be built as position-independent code (-fPIC). I did not see the required options to enable this in the upstream code, hence the patches like this. ~~
This adds support for CUDA 11, but still checks for CUDA 12 in the main cmake config. The few places in the CUDA code where CUDA12-specific features are used are behind #include guards.
The patches in the patches/ dir need to be applied to the recursively checked out repository, as we need to patches to the glad, tiny-cuda-nn and pybind11 source repos in include/.~~The first is needed as a shared library (and so the Python module) on Linux requires the code in the tiny-cuda-nn library to be built as position-independent code (-fPIC). I did not see the required options to enable this in the upstream code, hence the patches like this. ~~
The patch to pybind11 is needed when building against CUDA12 to work around https://github.com/pybind/pybind11/issues/4606
Finally, I had an error related to the use of #pragma once, which I worked around using include guards.