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.ndarrays in arguments. Especially note that, unlikeget_array_module(), this method does not recognizeVariableobjects. If you need to get device from theVariableinstancev, you need to useget_device_from_array(v.array).- Parameters
arrays (
cupy.ndarrayor list ofcupy.ndarray) – A CuPy array which this function returns the device corresponding to. If a list ofcupy.ndarrays are given, it returns the first device object of an array in the list.