cconvey commented on code in PR #12639:
URL: https://github.com/apache/tvm/pull/12639#discussion_r974492134
##########
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:
Would it make sense to (in some manner) control this via cmake?
I'm just wondering if some developers will want to use patched or custom
LLVM builds that _should_ make use of this option, but which don't cause
`TVM_LLVM_VERSION >= 160` to be true.
I don't know either way, just figured I'd ask the question.
##########
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:
Would it make sense to (in some manner) control this via cmake?
I'm just wondering if some developers will want to use patched or custom
LLVM builds that _should_ make use of this option, but that don't cause
`TVM_LLVM_VERSION >= 160` to be true.
I don't know either way, just figured I'd ask the question.
--
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]