0

Trying to build ArrayFire examples, everything goes well until I get to the CUDA ones. They are supposed to be skipped, since I have an AMD processor/GPU. However, during the build process, the CUDA section is built anyway, failing for obvious reasons, interrupting the rest of the process.

I could manually change the CMakeLists.txt files. However, is there a higher level way to let the build system (cmake) know that I do not have a CUDA compatible GPU?

It looks like the ArrayFire_CUDA_FOUND and CUDA_FOUND macros are erroneously defined on my system.

talonmies
  • 70,661
  • 34
  • 192
  • 269
Pietro
  • 12,086
  • 26
  • 100
  • 193

1 Answers1

1

The ArrayFire CMake build provides a flag to disable the CUDA backend. Simply set AF_BUILD_CUDA to NO via -DAF_BUILD_CUDA=NO at the command line to disable CUDA.

Alex Reinking
  • 16,724
  • 5
  • 52
  • 86
  • Does that macro have to be set when building ArrayFire, or when building an application that uses ArrayFire? In my case I downloaded the prebuilt Linux version, and may have to build it myself... – Pietro Jul 22 '21 at 23:02
  • When building ArrayFire from sources. – Alex Reinking Jul 22 '21 at 23:28