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

Fix #3607 #3619

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all 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
12 changes: 6 additions & 6 deletions csrc/scheduler/transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ bool TransposeScheduler::canScheduleCompileTime(Fusion* fusion) {
}
}

if (!hasAtLeastTwoValidGroups(fusion)) {
scheduler_debug_utils::canScheduleRejectReason(
schedulerType(), "cannot find two mismatching inner most dimensions");
return false;
}

if (ir_utils::hasAnyReductionOps(fusion)) {
scheduler_debug_utils::canScheduleRejectReason(
schedulerType(), "no support for reduction ops");
Expand All @@ -87,6 +81,12 @@ bool TransposeScheduler::canScheduleCompileTime(Fusion* fusion) {
return false;
}

if (!hasAtLeastTwoValidGroups(fusion)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved this here because because it uses getInputsOutputsWithInnerDim, which uses FindAllMappedDims, which asserts the existence of mappings between sibling tensors.

https://github.com/NVIDIA/Fuser/blob/main/csrc/scheduler/utils.cpp#L1476

I'm not entirely sure why we should have an assertion there. If the from tensor has a mapping to nullptr, which is not asserted, but propagating that to a sibling is asserted. I think we can just remove the assertion, but not 100% sure.

Instead, we shouldn't do this level of analysis until the fusion is confirmed to consist of only pointwise ops with no reduction. This should avoid the issue and also would help reduce the segmentation cost.

scheduler_debug_utils::canScheduleRejectReason(
schedulerType(), "cannot find two mismatching inner most dimensions");
return false;
}

return true;
}

Expand Down
Loading