device¶
- class nvtripy.device(device: str)[source]¶
Bases:
object
Represents the device where a tensor will be allocated.
- 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.