MCPcopy Create free account
hub / github.com/NVIDIA/DALI / gpu

Method gpu

dali/python/nvidia/dali/experimental/dynamic/_tensor.py:363–369  ·  view source on GitHub ↗

Returns the tensor on the GPU. If it's already there, this function returns `self`. If index is not specified, the current CUDA device is used.

(self, index: int | None = None)

Source from the content-addressed store, hash-verified

361 return self.to_device(Device.CPU)
362
363 def gpu(self, index: int | None = None) -> "Tensor":
364 """
365 Returns the tensor on the GPU. If it's already there, this function returns `self`.
366
367 If index is not specified, the current CUDA device is used.
368 """
369 return self.to_device(Device("gpu", index))
370
371 @property
372 def device(self) -> Device:

Callers 3

transform_inputFunction · 0.95
test_device_changeFunction · 0.95

Calls 2

to_deviceMethod · 0.95
DeviceClass · 0.70

Tested by 2

test_device_changeFunction · 0.76