It does make sense to send host-side buffers over the
network though, or
as a way to save a state to file.
You could do the same with device buffers (with an auto copy from device
memory when pickling and to device when unpicking) although you'd need to
disambiguate which device you wish to unpickle to, maybe through a
On 17 Aug 2016 05:44, "Andreas Kloeckner" <lists(a)informa.tiker.net>
Marcos Paulo Rocha <markao01(a)gmail.com> writes:
Hi, i'm using multiprocessing and pyopencl
and need to pass pyopencl
objects between processes. The problem is that pyopencl objects aren't
compatibles with pickle module, using by multiprocessing lib. Any idea
solve this problem ?
Honestly, the only PyOpenCL object that I could think of that we could
meaningfully pickle is a device. Contexts, command queues, buffers, and
all the other stuff are not likely to make sense in the context of
another process. (At the OpenCL API level they're pointers, and they
each carry substantial non-enumerable state that we just can't package
up.) But even for devices, you're probably better off sending (platform
name, device name, index) triples...
PyOpenCL mailing list