JuliaGPU / ArrayFire.jl

Julia wrapper for the ArrayFire library
Other
204 stars 37 forks source link

set_backend(AF_BACKEND_CUDA): Failed to load dynamic library on Windows #214

Open 4lrdyD opened 6 years ago

4lrdyD commented 6 years ago

I got the lib folder in the system path, however:

julia> set_backend(AF_BACKEND_CUDA)
ERROR: ArrayFire Error (501) : Failed to load dynamic library.
Error in af_err __cdecl unified::AFSymbolManager::setBackend(af_backend)
In file src\api\unified\symbol_manager.cpp:232
Failed to load dynamic library. See http://www.arrayfire.com/docs/unifiedbackend.htm for instructions to set up environment for Unified backend.

Stacktrace:
 [1] _error(::UInt32) at C:\Users\user\.julia\v0.6\ArrayFIre\src\util.jl:81
 [2] set_backend(::UInt32) at C:\Users\user\.julia\v0.6\ArrayFIre\src\wrap.jl:865
julia> versioninfo()
Julia Version 0.6.3
Commit d55cadc350* (2018-05-28 20:20 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
julia> afinfo()
ArrayFire v3.6.1 (OpenCL, 64-bit Windows, build b443e14)
[0] NVIDIA: GeForce GT 630M, 2048 MB
-1- INTEL: Intel(R) HD Graphics 4000, 1400 MB
-2- INTEL: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz, 6037 MB
4lrdyD commented 5 years ago

I tried to use ArrayFire with Visual C++, and when I use the helloworld sample with af.lib or afopencl.lib I get expected results with the info of the device:

ArrayFire v3.6.1 (OpenCL, 64-bit Windows, build b443e14)
[0] NVIDIA: GeForce GT 630M, 2048 MB
-1- INTEL: Intel(R) HD Graphics 4000, 1400 MB
-2- INTEL: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz, 6037 MB

but when I use afcuda.lib i get the following:

ArrayFire Exception (Internal error:998):
In function __cdecl cuda::DeviceManager::DeviceManager(void)
In file src\backend\cuda\platform.cpp:509
CUDA Error (35): CUDA driver version is insufficient for CUDA runtime version

In function void __cdecl af::setDevice(const int)
In file src\api\cpp\device.cpp:92

I tried to find newer driver version, but I have the latest for my device (v391.35), I guess the issue is for this reason and it won't be fixed unless I work with another device since mine must be somewhat deprecated, or maybe wait for another version of the driver, if it comes out.