Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
70246ab7
Commit
70246ab7
authored
3 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Adding nvdla pass sequence in hpvm-clang
parent
8b0989e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hpvm/tools/hpvm-clang/main.py.in
+15
-2
15 additions, 2 deletions
hpvm/tools/hpvm-clang/main.py.in
with
15 additions
and
2 deletions
hpvm/tools/hpvm-clang/main.py.in
+
15
−
2
View file @
70246ab7
...
...
@@ -52,6 +52,18 @@ def compile_hpvm_c(
"
inplace
"
,
"
hpvm-fuse
"
,
"
dfg2llvm-wrapperapi
"
,
f
"
configuration-inputs-filename=
{
conf_file
}
"
]
elif
tensor_target
==
"
nvdla
"
:
if
conf_file
is
None
:
raise
ValueError
(
"
conf_file must be defined when tensor_target==
'
tensor
'
.
"
)
passes
+=
[
"
LLVMHPVM2NVDLAPass
"
]
pass_flags
+=
[
"
hpvm-nvdla
"
,
"
cprecision=fp16
"
,
"
calib-table=calib.txt
"
]
elif
tensor_target
==
"
cudnn
"
:
passes
+=
[
"
LLVMInPlaceDFGAnalysis
"
,
"
LLVMDFG2LLVM_CUDNN
"
]
pass_flags
+=
[
"
inplace
"
,
"
dfg2llvm-cudnn
"
]
...
...
@@ -198,7 +210,7 @@ See option -b for that."""
"
-t
"
,
"
--tensor-target
"
,
type
=
str
,
choices
=
[
"
tensor
"
,
"
cudnn
"
],
choices
=
[
"
tensor
"
,
"
cudnn
"
,
"
nvdla
"
],
help
=
"
Backend to use for tensor operators
"
,
)
parser
.
add_argument
(
...
...
@@ -254,6 +266,7 @@ See option -b for that."""
if
args
.
tensor_target
==
"
tensor
"
:
if
args
.
conf_file
is
None
:
parser
.
error
(
'
Tensor target
"
tensor
"
requires --conf-file argument
'
)
if
args
.
x
==
"
c
"
:
args
.
is_cpp
=
False
elif
args
.
x
==
"
c++
"
:
...
...
@@ -262,7 +275,7 @@ See option -b for that."""
parser
.
error
(
f
"
Language mode
{
args
.
x
}
not supported yet -- only c or c++
"
)
if
not
HPVM_USE_OPENCL
and
args
.
opencl
:
parser
.
error
(
f
"
OpenCL is disabled for this build of HPVM.
"
)
if
not
HPVM_HAS_TRT
and
args
.
tensor_target
:
if
not
HPVM_HAS_TRT
and
args
.
tensor_target
!=
"
nvdla
"
:
parser
.
error
(
"
Tensor domain support is disabled for this build of HPVM;
"
"
please check your CMake warnings during compilation.
"
...
...
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