chainer.backends.cuda.get_device_from_array¶
-
chainer.backends.cuda.
get_device_from_array
(*arrays)[source]¶ Gets the device from a list of CuPy array or a single CuPy array.
Deprecated since version v6.0.0: This API is deprecated. Please use
get_device_from_array()
instead.The device on which the given CuPy array reside is returned.
Note
This method only recognizes
cupy.ndarray
s in arguments. Especially note that, unlikeget_array_module()
, this method does not recognizeVariable
objects. If you need to get device from theVariable
instancev
, you need to useget_device_from_array(v.array)
.- Parameters
arrays (
cupy.ndarray
or list ofcupy.ndarray
) – A CuPy array which this function returns the device corresponding to. If a list ofcupy.ndarray
s are given, it returns the first device object of an array in the list.