-
Notifications
You must be signed in to change notification settings - Fork 7
Misc: GPU Notes
J.L Stevens edited this page Apr 17, 2015
·
1 revision
Stonesoup setup:
First add CUDA to the path:
export CUDA_ROOT=/opt/cuda/
export PATH=$PATH:/opt/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib
Having added CUDA to the path we can install the Python dependencies:
pip install scipy pycuda cffi
pip install https://github.com/lebedov/scikits.cuda/tree/cffi
Temporary hack to add includes such that cffi can find them, file scikits-cuda/cuda/_cusparse_cffi_autogen.py
ffi_lib = ffi.verify(__verify_scr, libraries=['cusparse'],
include_dirs=['/usr/local/cuda/include',
'/opt/cuda/include'],
library_dirs=['/usr/local/cuda/lib64/',
'/opt/cuda/lib64/'])
To get weights from the GPU into CF form:
lgnon = topo.sim.V1.LGNOnAfferent.weights_gpu.todense().get()
Image(lgnon[1296, :].reshape(60,60))