public class RPCSession extends Object
| Modifier and Type | Method and Description |
|---|---|
TVMContext |
cl()
Construct remote OpenCL device.
|
TVMContext |
cl(int devId)
Construct remote OpenCL device.
|
TVMContext |
context(int devType)
Construct a remote context.
|
TVMContext |
context(int devType,
int devId)
Construct a remote context.
|
TVMContext |
context(String devType)
Construct a remote context.
|
TVMContext |
context(String devType,
int devId)
Construct a remote context.
|
TVMContext |
cpu()
Construct remote CPU device.
|
TVMContext |
cpu(int devId)
Construct remote CPU device.
|
byte[] |
download(String path)
Download file from remote temp folder.
|
Function |
getFunction(String name)
Get function from the session.
|
TVMContext |
gpu()
Construct remote GPU device.
|
TVMContext |
gpu(int devId)
Construct remote GPU device.
|
Module |
loadModule(String path)
Load a remote module, the file need to be uploaded first.
|
TVMContext |
metal()
Construct remote Metal device.
|
TVMContext |
metal(int devId)
Construct remote Metal device.
|
void |
upload(byte[] data,
String target)
Upload binary to remote runtime temp folder.
|
void |
upload(File data)
Upload file to remote runtime temp folder.
|
void |
upload(File data,
String target)
Upload file to remote runtime temp folder.
|
TVMContext |
vulkan()
Construct remote OpenCL device.
|
TVMContext |
vulkan(int devId)
Construct remote OpenCL device.
|
public Function getFunction(String name)
name - The name of the function.public TVMContext context(String devType, int devId)
devType - device type.devId - device id.public TVMContext context(String devType)
devType - device type.public TVMContext context(int devType, int devId)
devType - device type.devId - device id.public TVMContext context(int devType)
devType - device type.public TVMContext cpu(int devId)
devId - device id.public TVMContext cpu()
public TVMContext gpu(int devId)
devId - device id.public TVMContext gpu()
public TVMContext cl(int devId)
devId - device id.public TVMContext cl()
public TVMContext vulkan(int devId)
devId - device id.public TVMContext vulkan()
public TVMContext metal(int devId)
devId - device id.public TVMContext metal()
public void upload(byte[] data,
String target)
data - The binary in local to upload.target - The path in remote, cannot be null.public void upload(File data, String target) throws IOException
data - The file in local to upload.target - The path in remote.IOException - for network failure.public void upload(File data) throws IOException
data - The file in local to upload.IOException - for network failure.public byte[] download(String path)
path - The relative location to remote temp folder.Copyright © 2021. All rights reserved.