fixstars / clpy

OpenCL backend for CuPy
Other
154 stars 13 forks source link

Asynchronous memory transfer #123

Open LWisteria opened 6 years ago

LWisteria commented 6 years ago

Currently, all async memory operation are implemented as sync.

They are should be implemented as async.

ybsh commented 5 years ago

@LWisteria When the source and destination of copy_from_device_async() are both device memory objects (cl_mem), should it raise an error, or execute EnqueueCopyBuffer just as in copy_from_device()?

LWisteria commented 5 years ago

@ybsh I understand that your question is about clpy itself but not about this issue. If you suggest raising an error on copy_from_device() (and also on _async), please make an issue for it.

ybsh commented 5 years ago

@LWisteria Thank you for your advice, and sorry that was off-topic. Aside from the error handling issue above, I think it is necessary to migrate CuPy's Event/Stream classes first, as those async family take a CUDA stream as one of their arguments. Do you agree? If you do, could I open an issue for that?

ybsh commented 5 years ago

Regarding the migration of CUDA Stream, @LWisteria told me an issue for that has already been created: https://github.com/fixstars/clpy/issues/5

LWisteria commented 5 years ago

This issue would be pending because _async functions are not used in cupy tests and even in chainer.