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 2022/06/27 17:05:59 UTC

[GitHub] [tvm] AndrewZhaoLuo commented on a diff in pull request #11906: set FLUSH_TO_ZERO ON by default

AndrewZhaoLuo commented on code in PR #11906:
URL: https://github.com/apache/tvm/pull/11906#discussion_r907607721


##########
src/target/codegen.cc:
##########
@@ -54,6 +55,13 @@ runtime::Module Build(IRModule mod, Target target) {
 
   // the build function.
   std::string build_f_name = "target.build." + target->kind->name;
+  if (target->kind->name == "llvm" && !(_mm_getcsr() & 0x8040)) {
+    LOG(WARNING) << "Set FLUSH_TO_ZERO ON by default in Build on LLVM."<< std::endl;
+    //DAZ
+    _mm_setcsr( _mm_getcsr() | 0x0040 );
+    //FTZ
+    _mm_setcsr( _mm_getcsr() | 0x8000 );
+  }

Review Comment:
   Is this portable?



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