taichi-dev/taichi-aot-demo

find_package(CUDAToolkit REQUIRED) even when TI_WITH_CUDA Off

jarmitage opened this issue · 1 comments

This option doesn't seem to be referencing the top-level CMakeFiles:

Resulting in:

CMake Error at /.miniconda3/envs/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindCUDAToolkit.cmake:748 (message):
  Could not find nvcc, please set CUDAToolkit_ROOT.
Call Stack (most recent call first):
  framework/CMakeLists.txt:92 (find_package)

Even when:

option(TI_WITH_CUDA "Compile with CUDA backend" OFF)

Usually we disables entire LLVM backend without CUDA because the CPU backend has some issue with its allocator (memories doesn't dealloc). So I would recommend you to shift to the SPIR-V backends like Vulkan or Metal for deployment (if CUDA is unwanted). But please feel free to PR this change if you find it necessary.