joshherr-quic commented on code in PR #12639:
URL: https://github.com/apache/tvm/pull/12639#discussion_r974500764


##########
src/target/llvm/codegen_hexagon.cc:
##########
@@ -513,6 +513,13 @@ runtime::Module BuildHexagon(IRModule mod, Target target) {
                           {"-hexagon-small-data-threshold=0",
                            "-force-target-max-vector-interleave=1", 
"-hexagon-autohvx=1"});
 
+  // Disable unrolling (bug fix in LLVM 16 for int8 vectors)
+  // TODO: figure out why unroll is causing significant compile
+  // time and binary size issues for bert int8 model among others.
+#if TVM_LLVM_VERSION >= 160
+  llvm_options_vec.insert({"-unroll-threshold=0"})
+#endif

Review Comment:
   That's a good point, but I don't expect this workaround to be in here for a 
particularly long time. There aren't any active plans to put the related LLVM 
patch in any releases <= 16.0, so it would surprise me if someone ran into this 
without knowing about the issue specifically, in which case they could make the 
needed adjustments to gate their llvm in.
   
   I think if this were a permanent solution, some cmake magic would be nice, 
but since it is just a workaround, nobody should (hopefully) run into it before 
a real fix is issued.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to