Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always enable IdModel-based indexing when resize is used #3567

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions csrc/device_lower/lower2device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ IdModelOptions getIdModelOptions(Fusion* fusion) {
} else if (expr->isA<MmaOp>()) {
options.setBuildTensorIndexer(true);
continue;
} else if (expr->isOneOf<SliceOp, PadOp>()) {
options.setProducerIndex(true);
options.setConsumerIndex(true);
options.setInlinePredicate(true);
options.setUnswitchPredicate(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have options.setLoop(true) also?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see your comment in test_resize.cpp now.

continue;
} else if (auto reshape = dynamic_cast<ViewOp*>(expr)) {
// The legacy indexer has an issue when an expand broadcast is
// involved in reshape transformations. Enable both tensor and
Expand Down
Loading
Loading