tvm_ffi.device#
- tvm_ffi.device(device_type, index=None)[source]#
Construct a TVM FFI device with given device type and index.
- Parameters:
- Return type:
- Returns:
device (tvm_ffi.Device)
Examples
Device can be used to create reflection of device by string representation of the device type.
assert tvm_ffi.device("cuda:0") == tvm_ffi.device("cuda", 0) assert tvm_ffi.device("cpu:0") == tvm_ffi.device("cpu", 0)