Skip to content

Commit

Permalink
[JVM] Update the runtime PackedFunc for module
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Feb 12, 2020
1 parent aaf62e4 commit 79cfab0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jvm/core/src/main/java/org/apache/tvm/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected Map<String, Function> 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;
Expand Down Expand Up @@ -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();
}

/**
Expand All @@ -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();
}
Expand All @@ -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;
}
}

0 comments on commit 79cfab0

Please sign in to comment.