Package org.apache.tvm
Class Device
java.lang.Object
org.apache.tvm.Device
- Direct Known Subclasses:
TVMRemoteDevice
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Devicecpu()static Devicecpu(int devId) Construct a CPU device.static Devicecuda()static Devicecuda(int devId) Construct a CUDA GPU device.booleanbooleanexist()Whether this device exists.inthashCode()static Devicehexagon()static Devicehexagon(int devId) Construct a Hexagon device.longMaximum number of threads on each block.static Devicemetal()static Devicemetal(int devId) Construct a metal device.static Deviceopencl()static Deviceopencl(int devId) Construct a OpenCL device.voidsync()Synchronize until jobs finished at the device.toString()static Devicevpi()static Devicevpi(int devId) Construct a VPI simulated device.static Devicevulkan()static Devicevulkan(int devId) Construct a Vulkan device.longwarpSize()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
-