0

Thanks to this answer, CUDA 12 C++20 support with CMake not working, I have .cu files building with C++20 using CMake and Visual Studio 2022.

However, when I import a C++ module in a .cu file, it gives an error: "catastrophic error : could not find module file for module"

Are C++20 modules supported in CUDA 12? I cannot find examples anywhere.

It is also possible that I need to modify the CMake configuration, but I'm not sure what needs to be done.

Dale Barnard
  • 779
  • 1
  • 7
  • 16

1 Answers1

3

Quoting the CUDA 12.0 documentation:

Modules are not supported in CUDA C++, in either host or device code. Uses of the module, export and import keywords are diagnosed as errors.

talonmies
  • 70,661
  • 34
  • 192
  • 269