Package org.apache.tvm.rpc
Class RPCSession
java.lang.Object
org.apache.tvm.rpc.RPCSession
RPC Client session module.
Do not directly create the object, use Client.connect.
-
Method Summary
Modifier and TypeMethodDescriptioncl()
Construct remote OpenCL device.cl
(int devId) Construct remote OpenCL device.cpu()
Construct remote CPU device.cpu
(int devId) Construct remote CPU device.cuda()
Construct remote CUDA GPU device.cuda
(int devId) Construct remote CUDA GPU device.device
(int devType) Construct a remote device.device
(int devType, int devId) Construct a remote device.Construct a remote device.Construct a remote device.byte[]
Download file from remote temp folder.getFunction
(String name) Get function from the session.loadModule
(String path) Load a remote module, the file need to be uploaded first.metal()
Construct remote Metal device.metal
(int devId) Construct remote Metal device.void
Upload binary to remote runtime temp folder.void
Upload file to remote runtime temp folder.void
Upload file to remote runtime temp folder.vulkan()
Construct remote OpenCL device.vulkan
(int devId) Construct remote OpenCL device.
-
Method Details
-
getFunction
Get function from the session.- Parameters:
name
- The name of the function.- Returns:
- The result function.
-
device
Construct a remote device.- Parameters:
devType
- device type.devId
- device id.- Returns:
- The corresponding encoded remote device.
-
device
Construct a remote device.- Parameters:
devType
- device type.- Returns:
- The corresponding encoded remote device.
-
device
Construct a remote device.- Parameters:
devType
- device type.devId
- device id.- Returns:
- The corresponding encoded remote device.
-
device
Construct a remote device.- Parameters:
devType
- device type.- Returns:
- The corresponding encoded remote device.
-
cpu
Construct remote CPU device.- Parameters:
devId
- device id.- Returns:
- Remote CPU device.
-
cpu
Construct remote CPU device.- Returns:
- Remote CPU device.
-
cuda
Construct remote CUDA GPU device.- Parameters:
devId
- device id.- Returns:
- Remote CUDA GPU device.
-
cuda
Construct remote CUDA GPU device.- Returns:
- Remote CUDA GPU device.
-
cl
Construct remote OpenCL device.- Parameters:
devId
- device id.- Returns:
- Remote OpenCL device.
-
cl
Construct remote OpenCL device.- Returns:
- Remote OpenCL device.
-
vulkan
Construct remote OpenCL device.- Parameters:
devId
- device id.- Returns:
- Remote OpenCL device.
-
vulkan
Construct remote OpenCL device.- Returns:
- Remote OpenCL device.
-
metal
Construct remote Metal device.- Parameters:
devId
- device id.- Returns:
- Remote metal device.
-
metal
Construct remote Metal device.- Returns:
- Remote metal device.
-
upload
Upload binary to remote runtime temp folder.- Parameters:
data
- The binary in local to upload.target
- The path in remote, cannot be null.
-
upload
Upload file to remote runtime temp folder.- Parameters:
data
- The file in local to upload.target
- The path in remote.- Throws:
IOException
- for network failure.
-
upload
Upload file to remote runtime temp folder.- Parameters:
data
- The file in local to upload.- Throws:
IOException
- for network failure.
-
download
Download file from remote temp folder.- Parameters:
path
- The relative location to remote temp folder.- Returns:
- The result blob from the file.
-
loadModule
Load a remote module, the file need to be uploaded first.- Parameters:
path
- The relative location to remote temp folder.- Returns:
- The remote module containing remote function.
-