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/09/19 17:24:55 UTC

[GitHub] [tvm] joshherr-quic commented on a diff in pull request #12639: [HEXAGON] Disable automatic unrolling in LLVM

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: commits-unsubscribe@tvm.apache.org

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