copy¶
- nvtripy.copy(input: Tensor, device: device) Tensor [source]¶
Copies the input tensor to the specified device.
Caution
This function cannot be used in a compiled function or
nvtripy.Module
because it depends on evaluating its inputs, which is not allowed during compilation.- Parameters:
- Returns:
[dtype=T1] A new tensor on the specified device.
- Raises:
TripyException – If the input tensor is already on the specified device, as performing copies within the same device is currently not supported.
- Return type: