petrex commented on a change in pull request #4499: [CodeGen] Update ROCm 
Intrinsic Rule
URL: https://github.com/apache/incubator-tvm/pull/4499#discussion_r356463143
 
 

 ##########
 File path: src/codegen/llvm/intrin_rule_rocm.cc
 ##########
 @@ -45,27 +44,28 @@ inline void DispatchExternOCML(const TVMArgs& args, 
TVMRetValue* rv) {
 namespace llvm {
 
 TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.floor")
-.set_body(DispatchLLVMPureIntrin<::llvm::Intrinsic::floor, 1>);
+.set_body(DispatchExternOCML);
 
 TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.ceil")
-.set_body(DispatchLLVMPureIntrin<::llvm::Intrinsic::ceil, 1>);
+.set_body(DispatchExternOCML);
 
 TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.round")
-.set_body(DispatchLLVMPureIntrin<::llvm::Intrinsic::round, 1>);
+.set_body(DispatchExternOCML);
 
 TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.trunc")
-.set_body(DispatchLLVMPureIntrin<::llvm::Intrinsic::trunc, 1>);
+.set_body(DispatchExternOCML);
 
 TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.fabs")
-.set_body(DispatchLLVMPureIntrin<::llvm::Intrinsic::fabs, 1>);
+.set_body(DispatchExternOCML);
 
 
 Review comment:
   @masahi Thanks for the feedback.
   
   Yes, OCMLs are intermediate representations of low-level mathematical 
functions.
   
   The benefits would be 
   
   - Fixed, simple API so it scales across different architectures.  There are 
experts working on optimization SW implementations for newer architecture. We 
might get performance gain with later SW/HW release. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to