Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
79cfab00
Commit
79cfab00
authored
Feb 12, 2020
by
tqchen
Committed by
Tianqi Chen
Feb 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[JVM] Update the runtime PackedFunc for module
parent
aaf62e47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
jvm/core/src/main/java/org/apache/tvm/Module.java
+4
-4
No files found.
jvm/core/src/main/java/org/apache/tvm/Module.java
View file @
79cfab00
...
...
@@ -38,7 +38,7 @@ public class Module extends TVMValue {
private
static
Function
getApi
(
String
name
)
{
Function
func
=
apiFuncs
.
get
().
get
(
name
);
if
(
func
==
null
)
{
func
=
Function
.
getFunction
(
"
modul
e."
+
name
);
func
=
Function
.
getFunction
(
"
runtim
e."
+
name
);
apiFuncs
.
get
().
put
(
name
,
func
);
}
return
func
;
...
...
@@ -126,7 +126,7 @@ public class Module extends TVMValue {
* @return type key of the module.
*/
public
String
typeKey
()
{
return
getApi
(
"
_
GetTypeKey"
).
pushArg
(
this
).
invoke
().
asString
();
return
getApi
(
"
Module
GetTypeKey"
).
pushArg
(
this
).
invoke
().
asString
();
}
/**
...
...
@@ -137,7 +137,7 @@ public class Module extends TVMValue {
* @return The loaded module
*/
public
static
Module
load
(
String
path
,
String
fmt
)
{
TVMValue
ret
=
getApi
(
"
_
LoadFromFile"
).
pushArg
(
path
).
pushArg
(
fmt
).
invoke
();
TVMValue
ret
=
getApi
(
"
Module
LoadFromFile"
).
pushArg
(
path
).
pushArg
(
fmt
).
invoke
();
assert
ret
.
typeCode
==
TypeCode
.
MODULE_HANDLE
;
return
ret
.
asModule
();
}
...
...
@@ -154,7 +154,7 @@ public class Module extends TVMValue {
* @return Whether runtime is enabled.
*/
public
static
boolean
enabled
(
String
target
)
{
TVMValue
ret
=
getApi
(
"
_
Enabled"
).
pushArg
(
target
).
invoke
();
TVMValue
ret
=
getApi
(
"
Runtime
Enabled"
).
pushArg
(
target
).
invoke
();
return
ret
.
asLong
()
!=
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment