The shared variable won't be moved off the GPU. But we could have it contain a new object. We do not garanty to reuse that memory.
Maybe it was replaced by a view to some other memory and that this ptr isn't one returned by cuda malloc. I don't know if that is a requirement or not. There is this closed issue in libgpuarray that suggest to use another mechanism: nccl: https://github.com/Theano/libgpuarray/issues/330 ALso, just to be sure, we are changing Theano back-end. You should work with the new one, we won't help with the old one. Fred On Thu, Feb 2, 2017 at 12:48 AM lachlan ts <[email protected]> wrote: > Hello, > > I'm trying to get an IPC device pointer to the GPU memory allocated to a > shared variable with the hope that I can transfer data between GPUs without > transferring back to host memory. > > Currently I'm using something like: > > | x_ga = theano.misc.pycuda_utils.to_gpuarray(x.container.value) > | x_ipc = pycuda.driver.mem_get_ipc_handle(x_ga.ptr) > > where 'x' is a theano.shared() instance. > > My problem is that if I run this before running my theano function (which > updates x) it has no issues, however If I run it after it complains with > "cuIpcGetMemHandle failed: invalid argument". > > So I'm guessing that the pointer obtained with "x_ga.ptr" is no longer a > valid device pointer... or maybe pygpu is losing the cuda context. > > Is it possible that the shared variable has been moved off the GPU? > > -- > > --- > You received this message because you are subscribed to the Google Groups > "theano-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
