device¶
- class nvtripy.device(device: str)[source]¶
Bases:
objectRepresents the device where a tensor will be allocated.
Caution
Using multiple devices is not currently supported, so the device index must always be 0.
- Parameters:
device (str) – A string consisting of the device kind and an optional index. The device kind may be one of:
["cpu", "gpu"]. If the index is provided, it should be separated from the device kind by a colon (:). If the index is not provided, it defaults to 0.