Package org.apache.tvm
Class Device
java.lang.Object
org.apache.tvm.Device
- Direct Known Subclasses:
TVMRemoteDevice
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Device
cpu()
static Device
cpu
(int devId) Construct a CPU device.static Device
cuda()
static Device
cuda
(int devId) Construct a CUDA GPU device.boolean
boolean
exist()
Whether this device exists.int
hashCode()
static Device
hexagon()
static Device
hexagon
(int devId) Construct a Hexagon device.long
Maximum number of threads on each block.static Device
metal()
static Device
metal
(int devId) Construct a metal device.static Device
opencl()
static Device
opencl
(int devId) Construct a OpenCL device.void
sync()
Synchronize until jobs finished at the device.toString()
static Device
vpi()
static Device
vpi
(int devId) Construct a VPI simulated device.static Device
vulkan()
static Device
vulkan
(int devId) Construct a Vulkan device.long
warpSize()
Number of threads that executes in concurrent.
-
Field Details
-
deviceType
public final int deviceType -
deviceId
public final int deviceId
-
-
Constructor Details
-
Device
public Device(int deviceType, int deviceId) -
Device
-
-
Method Details
-
cpu
Construct a CPU device.- Parameters:
devId
- The device id- Returns:
- The created device
-
cpu
-
cuda
Construct a CUDA GPU device.- Parameters:
devId
- The device id- Returns:
- The created device
-
cuda
-
opencl
Construct a OpenCL device.- Parameters:
devId
- The device id- Returns:
- The created device
-
opencl
-
vulkan
Construct a Vulkan device.- Parameters:
devId
- The device id- Returns:
- The created device
-
vulkan
-
metal
Construct a metal device.- Parameters:
devId
- The device id- Returns:
- The created device
-
metal
-
vpi
Construct a VPI simulated device.- Parameters:
devId
- The device id- Returns:
- The created device
-
vpi
-
hexagon
Construct a Hexagon device.- Parameters:
devId
- The device id- Returns:
- The created device
-
hexagon
-
exist
public boolean exist()Whether this device exists.- Returns:
- true if exists.
-
maxThreadsPerBlock
public long maxThreadsPerBlock()Maximum number of threads on each block.- Returns:
- the maximum thread number.
-
warpSize
public long warpSize()Number of threads that executes in concurrent.- Returns:
- the thread number.
-
sync
public void sync()Synchronize until jobs finished at the device. -
hashCode
public int hashCode() -
equals
-
toString
-