Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
8065f2e0
Commit
8065f2e0
authored
7 years ago
by
Lianmin Zheng
Committed by
Tianqi Chen
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
support string option when create cuda/rocm/... target (#1071)
parent
2f87ddc9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/tvm/target.py
+8
-8
8 additions, 8 deletions
python/tvm/target.py
tests/python/unittest/test_lang_target.py
+1
-0
1 addition, 0 deletions
tests/python/unittest/test_lang_target.py
with
9 additions
and
8 deletions
python/tvm/target.py
+
8
−
8
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
)
...
...
This diff is collapsed.
Click to expand it.
tests/python/unittest/test_lang_target.py
+
1
−
0
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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment