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
20223241
Commit
20223241
authored
4 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Fixing Handling of tensor_set_node_id in CUDNN Pass
parent
f6b74ce9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp
+25
-3
25 additions, 3 deletions
llvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp
with
25 additions
and
3 deletions
llvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp
+
25
−
3
View file @
20223241
...
...
@@ -267,9 +267,9 @@ void CGT_CUDNN::codeGen(DFLeafNode* N) {
//assert((II->getCalledFunction()->getName()).startswith("llvm.visc.tensor")
// && "Only HPVM tensor intrinsics allowed in ApproxHPVM leaf nodes\n");
if
(
!
(
II
->
getCalledFunction
()
->
getName
()).
startswith
(
"llvm.visc.tensor"
)){
continue
;
// skip non-tensor ops
}
//
if (!(II->getCalledFunction()->getName()).startswith("llvm.visc.tensor")){
//
continue; // skip non-tensor ops
//
}
/********************* Handle VISC Tensor intrinsics ********************/
switch
(
II
->
getIntrinsicID
())
{
...
...
@@ -545,6 +545,28 @@ void CGT_CUDNN::codeGen(DFLeafNode* N) {
IItoRemove
.
push_back
(
II
);
}
break
;
case
Intrinsic
::
visc_node_id
:
{
/* llvm.visc.node.id */
DEBUG
(
errs
()
<<
F_cudnn
->
getName
()
<<
"
\t
: Handling Node ID Intrinsic
\n
"
);
// Get uint32 argument
Value
*
Op
=
II
->
getOperand
(
0
);
// Argument list for the runtime call
std
::
vector
<
Value
*>
Args
;
Args
.
push_back
(
II
->
getOperand
(
0
));
// Create hpvm-tensor-rt function call
Constant
*
tensor_set_node_id
;
DECLARE
(
tensor_set_node_id
);
CallInst
::
Create
(
tensor_set_node_id
,
Args
,
""
,
II
);
// Mark to remove at the end
IItoRemove
.
push_back
(
II
);
}
break
;
default
:
llvm_unreachable
(
"Unknown VISC Intrinsic!"
);
break
;
...
...
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