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
8065f2e0
Commit
8065f2e0
authored
Apr 01, 2018
by
Lianmin Zheng
Committed by
Tianqi Chen
Mar 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support string option when create cuda/rocm/... target (#1071)
parent
2f87ddc9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
python/tvm/target.py
+8
-8
tests/python/unittest/test_lang_target.py
+1
-0
No files found.
python/tvm/target.py
View file @
8065f2e0
...
...
@@ -349,10 +349,10 @@ def cuda(options=None):
Parameters
----------
options : list of str
options :
str or
list of str
Additional options
"""
options
=
options
if
options
else
[]
options
=
_merge_opts
([],
options
)
return
_api_internal
.
_TargetCreate
(
"cuda"
,
*
options
)
...
...
@@ -361,10 +361,10 @@ def rocm(options=None):
Parameters
----------
options : list of str
options :
str or
list of str
Additional options
"""
options
=
options
if
options
else
[]
options
=
_merge_opts
([],
options
)
return
_api_internal
.
_TargetCreate
(
"rocm"
,
*
options
)
...
...
@@ -373,7 +373,7 @@ def rasp(options=None):
Parameters
----------
options : list of str
options :
str or
list of str
Additional options
"""
opts
=
[
"-device=rasp"
,
...
...
@@ -389,7 +389,7 @@ def mali(options=None):
Parameters
----------
options : list of str
options :
str or
list of str
Additional options
"""
opts
=
[
"-device=mali"
]
...
...
@@ -402,10 +402,10 @@ def opengl(options=None):
Parameters
----------
options : list of str
options :
str or
list of str
Additional options
"""
options
=
options
if
options
else
[]
options
=
_merge_opts
([],
options
)
return
_api_internal
.
_TargetCreate
(
"opengl"
,
*
options
)
...
...
tests/python/unittest/test_lang_target.py
View file @
8065f2e0
...
...
@@ -43,6 +43,7 @@ def test_target_string_parse():
assert
target
.
options
==
[
'-libs=cublas,cudnn'
]
assert
target
.
keys
==
[
'cuda'
,
'gpu'
]
assert
target
.
libs
==
[
'cublas'
,
'cudnn'
]
assert
str
(
target
)
==
str
(
tvm
.
target
.
cuda
(
"-libs=cublas,cudnn"
))
if
__name__
==
"__main__"
:
test_target_dispatch
()
...
...
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