You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/10/14 00:08:59 UTC

[GitHub] [tvm] masahi commented on a change in pull request #9223: [Codegen][LLVM] Add ability to turn on fast math flags

masahi commented on a change in pull request #9223:
URL: https://github.com/apache/tvm/pull/9223#discussion_r728532649



##########
File path: src/target/llvm/llvm_common.cc
##########
@@ -106,10 +106,23 @@ void ParseLLVMTargetOptions(const Target& target, std::string* triple, std::stri
 #if TVM_LLVM_VERSION < 50
   opt.LessPreciseFPMADOption = true;
 #endif
-  opt.AllowFPOpFusion = llvm::FPOpFusion::Fast;
-  opt.UnsafeFPMath = false;
-  opt.NoInfsFPMath = false;
+  // We depend on generating IR with proper fast math flags to control fast math
+  // semantics. These just enable these optimizations if the proper IR flags
+  // are set.
+  opt.UnsafeFPMath = true;
+  opt.NoInfsFPMath = true;

Review comment:
       Better not to change the default values unless there is a good reason.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org