arrayfire-python
arrayfire-python copied to clipboard
Error when using af.set_backend('cuda')
When I try to switch backend using af.set_backend('cuda')
, I got error like:
It seems that I do not have cuda devices as candiated backend although I have 8 gpus in fact, and the output of af.info()
In [2]: af.info()
ArrayFire v3.6.2 (CPU, 64-bit Linux, build dc38ef1)
[0] Intel: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz, 257588 MB, Max threads(44)
and af.get_backend()
In [2]: af.get_backend()
Out[2]: 'unified'
So does I missing something when installing the package?
Hi @funcwj, do you have the arrayfire CUDA libraries on the directory you added to LD_LIBRARY_PATH? Also, could you check if you added the CUDA and CUDA NVVM lib directories to LD_LIBRARY_PATH? (Please see the wiki for more information about setting the environment variables)
I am running Ubuntu 18.04, and I have these in the same directory that I have the CPU, OpenCL, and Unified backend libraries. Please check if they are there for you:
libafcuda.so
libafcuda.so.3
libafcuda.so.3.7.0
(Note that it says 3.7.0 there because I've built these from source - we haven't released 3.7.0 yet)