From 7d1b64bacedcad9e81491828e9d8d22d647b6b4e Mon Sep 17 00:00:00 2001 From: Naoya Maruyama Date: Fri, 13 Dec 2024 14:25:42 -0800 Subject: [PATCH] Enable the Loop option of IdModle for resize (#3588) Followup to #3567. I just found the Loop option is also necessary. With this option, the inlining analysis uses IdModel to understand if inlining is possible. The loop generation lowering pass also uses IdModel loop promotion to figure out which iter domains to use for each `ForLoop` node. The latter is not necessary for the resize scheduler at this moment, though. --- csrc/device_lower/lower2device.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/csrc/device_lower/lower2device.cpp b/csrc/device_lower/lower2device.cpp index 9d39040f4be..2ce917e6842 100644 --- a/csrc/device_lower/lower2device.cpp +++ b/csrc/device_lower/lower2device.cpp @@ -353,6 +353,7 @@ IdModelOptions getIdModelOptions(Fusion* fusion) { options.setConsumerIndex(true); options.setInlinePredicate(true); options.setUnswitchPredicate(true); + options.setLoop(true); continue; } else if (auto reshape = dynamic_cast(expr)) { // The legacy indexer has an issue when an expand broadcast is