On Thu, Feb 8, 2018 at 3:25 AM, Pierrick Bruneau <pbruneau(a)gmail.com> wrote:
This may sound as dumb to some of you, but is it possible to use numpy
functions in code compiled by compiler.SourceModule in some way ? (e.g.
I'm wondering this as there seems to be a close bind between numpy arrays,
gpuarrays, and int/float arrays in C++ code.
If numpy is not an option, there are maybe good practices in terms of
included libraries that play well with pycuda? To avoid recoding every
possible vector/matrix and utility stats functions :)
One can make API calls to shared GPU-based libraries (CUBLAS, CUFFT,
etc.) that access GPU memory allocated by pycuda in between (but not
directly from) CUDA kernels compiled with compiler.SourceModule - see
. You may also want to take a look at
numba's GPU support (http://numba.pydata.org
Lev E. Givon, PhD