I have been attempting to force ArrayFire to use its CPU backend, rather than the default CUDA backend. According to this documentation page, you only need to call arrayfire.set_backend('cpu')
. However, when I attempt to do this, an error is thrown with the message global name 'backend' is not defined
. If you take a look at the source code, you will see that a global variable backend
is defined within the module directly before the set_backend
function is implemented. The following functions set and get various attributes of this backend
object. My question is: is an internal implementation error on their part causing this error, or is there something I'm doing wrong (or that can be done on my part to fix this)? I haven't worked much with Python modules before, and would greatly appreciate any help!
Asked
Active
Viewed 127 times
1

TimD1
- 982
- 15
- 26
-
1I am the maintainer of arrayfire-python, the error seems weird. Can you open an issue on the github page: https://github.com/arrayfire/arrayfire-python/issues. Can you also try to include the full stack trace of the error ? – Pavan Yalamanchili Jul 17 '17 at 18:35
-
I just discovered the cause. Someone else had previously been messing with the installation of arrayfire I'm using, and `backend = _clibrary()` was commented out in the source code. – TimD1 Jul 17 '17 at 18:40
-
1Glad that is resolved :) – Pavan Yalamanchili Jul 17 '17 at 18:40