Lunderberg commented on code in PR #16487:
URL: https://github.com/apache/tvm/pull/16487#discussion_r1478392750
##########
src/relax/transform/fuse_tir.cc:
##########
@@ -897,8 +973,11 @@ class TIRFuseMutator : public ExprMutator {
for (const auto& [gv, func] : mod->functions) {
// Only fuse primitive relax functions
if (func->IsInstance<relax::FunctionNode>() &&
func->HasNonzeroAttr(attr::kPrimitive)) {
- tir::PrimFunc fused_tir = FusedTIRConstructor::GetFusedTIR(mod, gv);
- mutator.fused_tir_funcs_.Set(gv, fused_tir);
+ const auto& [prim_func, indices] =
FusedTIRConstructor::GetFusedTIR(mod, gv);
+ mutator.fused_tir_funcs_.Set(gv, prim_func);
+ if (!indices.empty()) {
Review Comment:
Probably more personal preference, so either works.
--
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]