arrayfire / arrayfire-rust

Rust wrapper for ArrayFire
BSD 3-Clause "New" or "Revised" License
815 stars 58 forks source link

How to config the rust wrapper using CUDA and how to modify the build.conf file to build arrayfire submodule available in the rust wrapper #65

Closed liuwa666 closed 8 years ago

liuwa666 commented 8 years ago

Hi, firstly, thanks for your great project. I love rust and arrayfire. I'm a newer to arrayfire. I've installed the latest official cuda 7.5 installer and the latest official arrayfire installers( linux v3.3.1 64-bit) under my ubuntu 15.10. And I use the default configuration follow the official doc. But When I successfully build the arrayfire-rust lib and try to run the "unified" example in the ./examples folder. It shows me i only have cpu and opencl backends. CUDA backend can not be found. fuying fuying-kylin -rustprojs-arrayfire-rust_010

So my question is : _# how to config to let this wrapper to support cuda in my computer. _ By the way, the official cpp examples can be built successfully using Cuda. benchmarks_011

Another question is how to modify the build.conf file to build arrayfire submodule available in the rust wrapper. When I git clone the source from github. The build.conf file looks like: build conf -home-fuying-rustprojs-arrayfire-rust atom_012 How can I config these options: "glew_static": "OFF", "freeimage_type": "DYNAMIC", "cpu_fft_type": "FFTW", "cpu_blas_type": "LAPACKE", "cpu_lapack_type": "LAPACKE",

"freeimage_dir": "E:\\Libraries\\FreeImage\\Dist",
"fftw_dir": "E:\\Libraries\\fftw-3.3.4",
"acml_dir": "",
"mkl_dir": "",
"lapacke_dir": "E:\\Libraries\\lapack",
"glew_dir": "E:\\Libraries\\GLEW",
"glfw_dir": "E:\\Libraries\\glfw3",
"boost_dir": "E:\\Libraries\\boost_1_56_0",

"cuda_sdk": "/usr/local/cuda",
"opencl_sdk": "/usr"

By the way, I check the path of cuda libs, "cuda_sdk" option seems correct. So, what's the problem with my config. cuda_013

9prady9 commented 8 years ago

@fuyingfuying I believe @shehzan10 has already this question on forums. Just in case you haven't seen that yet.

liuwa666 commented 8 years ago

@9prady9 @shehzan10 thanks for your help, i try it and reply you later

liuwa666 commented 8 years ago

@9prady9 @shehzan10 thank you, I just don't add /usr/local/cuda/lib64 to the LD_LIBRARY_PATH, now it works fuying fuying-kylin -rustprojs-arrayfire-rust_015 fuying fuying-kylin -rustprojs-arrayfire-rust_016 fuying fuying-kylin -rustprojs-arrayfire-rust_017