public class TVMContext extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
deviceId |
int |
deviceType |
| Constructor and Description |
|---|
TVMContext(int deviceType,
int deviceId) |
TVMContext(String deviceType,
int deviceId) |
| Modifier and Type | Method and Description |
|---|---|
static TVMContext |
cpu() |
static TVMContext |
cpu(int devId)
Construct a CPU device.
|
boolean |
equals(Object other) |
boolean |
exist()
Whether this device exists.
|
static TVMContext |
gpu() |
static TVMContext |
gpu(int devId)
Construct a GPU device.
|
int |
hashCode() |
static TVMContext |
hexagon() |
static TVMContext |
hexagon(int devId)
Construct a Hexagon device.
|
long |
maxThreadsPerBlock()
Maximum number of threads on each block.
|
static TVMContext |
metal() |
static TVMContext |
metal(int devId)
Construct a metal device.
|
static TVMContext |
opencl() |
static TVMContext |
opencl(int devId)
Construct a OpenCL device.
|
void |
sync()
Synchronize until jobs finished at the context.
|
String |
toString() |
static TVMContext |
vpi() |
static TVMContext |
vpi(int devId)
Construct a VPI simulated device.
|
static TVMContext |
vulkan() |
static TVMContext |
vulkan(int devId)
Construct a Vulkan device.
|
long |
warpSize()
Number of threads that executes in concurrent.
|
public TVMContext(int deviceType,
int deviceId)
public TVMContext(String deviceType, int deviceId)
public static TVMContext cpu(int devId)
devId - The device idpublic static TVMContext cpu()
public static TVMContext gpu(int devId)
devId - The device idpublic static TVMContext gpu()
public static TVMContext opencl(int devId)
devId - The device idpublic static TVMContext opencl()
public static TVMContext vulkan(int devId)
devId - The device idpublic static TVMContext vulkan()
public static TVMContext metal(int devId)
devId - The device idpublic static TVMContext metal()
public static TVMContext vpi(int devId)
devId - The device idpublic static TVMContext vpi()
public static TVMContext hexagon(int devId)
devId - The device idpublic static TVMContext hexagon()
public boolean exist()
public long maxThreadsPerBlock()
public long warpSize()
public void sync()
Copyright © 2021. All rights reserved.