tvm_ffi.Device#
- class tvm_ffi.Device#
Bases:
object
Device represents a device in the ffi system.
Device is a thin wrapper around DLDevice in DLPack standard.
- Parameters:
Examples
You can use tvm_ffi.device function to create a Device.
assert tvm_ffi.device("cuda:0") == tvm_ffi.device("cuda", 0) assert tvm_ffi.device("cpu:0") == tvm_ffi.device("cpu", 0)
- __init__(*args, **kwargs)#
Methods
__init__
(*args, **kwargs)The device type int code used in the DLPack specification.
Attributes
- dlpack_device_type()#
The device type int code used in the DLPack specification.
- index#
The device index.
- type#
String representation of the device type.