chainer.backends.cuda.copy¶
-
chainer.backends.cuda.copy(array, out=None, out_device=None, stream=None)[source]¶ Copies a
cupy.ndarrayobject using the default stream.This function can copy the device array to the destination array on another device.
Parameters: - array (cupy.ndarray) – Array to be copied.
- out (cupy.ndarray) – Destination array.
If it is not
None, thenout_deviceargument is ignored. - out_device – Destination device specifier. Actual device object is
obtained by passing this value to
get_device(). - stream (cupy.cuda.Stream) – CUDA stream.
Returns: Copied array.
If
outis not specified, then the array is allocated on the device specified byout_deviceargument.Return type: