Update TvmRunner.java

master
agibsonccc 2021-03-11 11:56:29 +09:00
parent ec8341db21
commit 791bed8cdd
1 changed files with 3 additions and 4 deletions

View File

@ -28,7 +28,6 @@ import org.bytedeco.javacpp.*;
import org.bytedeco.tvm.*;
import org.nd4j.common.base.Preconditions;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.tvm.util.TVMUtils;
import static org.bytedeco.tvm.global.tvm_runtime.*;
import static org.nd4j.tvm.util.TVMUtils.*;
@ -36,12 +35,12 @@ import static org.nd4j.tvm.util.TVMUtils.*;
@Slf4j
public class TvmRunner implements Closeable {
private static DLContext ctx;
private Module modFactory;
private org.bytedeco.tvm.Module modFactory;
private TVMValue values;
private IntPointer codes;
private TVMArgsSetter setter;
private TVMRetValue rv;
private Module gmod;
private org.bytedeco.tvm.Module gmod;
private PackedFunc getNumInputs;
private PackedFunc getNumOutputs;
private PackedFunc setInput;
@ -57,7 +56,7 @@ public class TvmRunner implements Closeable {
// create the runtime module
try (PointerScope scope = new PointerScope()) {
modFactory = Module.LoadFromFile(modelUri);
modFactory = org.bytedeco.tvm.Module.LoadFromFile(modelUri);
values = new TVMValue(2);
codes = new IntPointer(2);
setter = new TVMArgsSetter(values, codes);