Hi all, I would like to use pycuda to write a few kernels to interoperate with a larger cuda/python library I'm already using. I can get the raw device memory address as a python int, and from searching past threads on the mailing list it sounds like I should be able to pass this as an argument to my kernel. However everything I try seems to generate an error -- I'm currently doing something like this:
. . . myfunc = mod.get_function("myfunc") # myob.get() returns memory address as int addr = np.uint32(myob.get()) myfunc(addr, block=block, grid=grid) but I get: TypeError: No registered converter was able to produce a C++ rvalue of type unsigned int from this Python object of type numpy.float64 If I try just addr = myob.get() (a python int for the address), I get: TypeError: invalid type on parameter #0 (0-based) Is there a way to do what I'm attempting? I don't see a way to create a DeviceAllocation from a raw address, but maybe I'm missing something? Thanks, -Sam -- -------------------- J. Samuel Preston Research Assistant Scientific Computing and Imaging Institute University of Utah
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda