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
53c0363d
Commit
53c0363d
authored
Dec 11, 2019
by
Peter Yeh
Committed by
masahi
Dec 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update rocm intrin rule (#4499)
parent
599775f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
src/codegen/llvm/intrin_rule_rocm.cc
+19
-9
No files found.
src/codegen/llvm/intrin_rule_rocm.cc
View file @
53c0363d
...
...
@@ -22,7 +22,6 @@
*/
#ifdef TVM_LLVM_VERSION
#include "intrin_rule_llvm.h"
#include <tvm/ir.h>
#include <tvm/expr.h>
#include <tvm/api_registry.h>
...
...
@@ -45,27 +44,28 @@ inline void DispatchExternOCML(const TVMArgs& args, TVMRetValue* rv) {
namespace
llvm
{
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.floor"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
floor
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.ceil"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
ceil
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.round"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
round
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.trunc"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
trunc
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.fabs"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
fabs
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.exp"
)
.
set_body
(
DispatchExternOCML
);
// On AMD GPU, fma is slower than mac
// removing fma dispatch allows backend to generate faster mac instruction
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.erf"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.fma"
)
.
set_body
(
Dispatch
LLVMPureIntrin
<::
llvm
::
Intrinsic
::
fmuladd
,
1
>
);
.
set_body
(
Dispatch
ExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.log"
)
.
set_body
(
DispatchExternOCML
);
...
...
@@ -78,6 +78,16 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.pow")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.tanh"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.cos"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.sin"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.atan"
)
.
set_body
(
DispatchExternOCML
);
}
// namespace llvm
}
// namespace codegen
}
// namespace tvm
...
...
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