MCPcopy Create free account
hub / github.com/apache/tvm / upload

Method upload

jvm/core/src/main/java/org/apache/tvm/rpc/RPCSession.java:184–195  ·  view source on GitHub ↗

Upload binary to remote runtime temp folder. @param data The binary in local to upload. @param target The path in remote, cannot be null.

(byte[] data, String target)

Source from the content-addressed store, hash-verified

182 * @param target The path in remote, cannot be null.
183 */
184 public void upload(byte[] data, String target) {
185 if (target == null) {
186 throw new IllegalArgumentException("Please specify the upload target");
187 }
188 final String funcName = "upload";
189 Function remoteFunc = remoteFuncs.get(funcName);
190 if (remoteFunc == null) {
191 remoteFunc = getFunction("tvm.rpc.server.upload");
192 remoteFuncs.put(funcName, remoteFunc);
193 }
194 remoteFunc.pushArg(target).pushArg(data).invoke();
195 }
196
197 /**
198 * Upload file to remote runtime temp folder.

Callers

nothing calls this directly

Calls 6

getFunctionMethod · 0.95
pushArgMethod · 0.95
getBytesFromFileMethod · 0.95
invokeMethod · 0.65
getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected