From f6eab9312911a8d31c4df54b0770b23d74532538 Mon Sep 17 00:00:00 2001 From: tqchen Date: Wed, 12 Feb 2020 11:20:23 -0800 Subject: [PATCH] [JVM] Update the runtime PackedFunc for module --- jvm/core/src/main/java/org/apache/tvm/Module.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jvm/core/src/main/java/org/apache/tvm/Module.java b/jvm/core/src/main/java/org/apache/tvm/Module.java index 14961317b88c..1656f8dee6fa 100644 --- a/jvm/core/src/main/java/org/apache/tvm/Module.java +++ b/jvm/core/src/main/java/org/apache/tvm/Module.java @@ -38,7 +38,7 @@ protected Map initialValue() { private static Function getApi(String name) { Function func = apiFuncs.get().get(name); if (func == null) { - func = Function.getFunction("module." + name); + func = Function.getFunction("runtime." + name); apiFuncs.get().put(name, func); } return func; @@ -126,7 +126,7 @@ public void importModule(Module module) { * @return type key of the module. */ public String typeKey() { - return getApi("_GetTypeKey").pushArg(this).invoke().asString(); + return getApi("ModuleGetTypeKey").pushArg(this).invoke().asString(); } /** @@ -137,7 +137,7 @@ public String typeKey() { * @return The loaded module */ public static Module load(String path, String fmt) { - TVMValue ret = getApi("_LoadFromFile").pushArg(path).pushArg(fmt).invoke(); + TVMValue ret = getApi("ModuleLoadFromFile").pushArg(path).pushArg(fmt).invoke(); assert ret.typeCode == TypeCode.MODULE_HANDLE; return ret.asModule(); } @@ -154,7 +154,7 @@ public static Module load(String path) { * @return Whether runtime is enabled. */ public static boolean enabled(String target) { - TVMValue ret = getApi("_Enabled").pushArg(target).invoke(); + TVMValue ret = getApi("RuntimeEnabled").pushArg(target).invoke(); return ret.asLong() != 0; } }