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

Add slice tests to demonstrate manual scheduling #2898

Merged
merged 21 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions csrc/device_lower/lower2device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,6 @@ void GpuLower::analysis(Fusion* fusion) {
validateSwizzle(fusion_);
dumpExprsIfEnabled(fusion_->exprs(), "validateSwizzle");

validateResize(fusion_);
dumpExprsIfEnabled(fusion_->exprs(), "validateResize");

validateReductions(fusion_);
dumpExprsIfEnabled(fusion_->exprs(), "validateReductions");

Expand Down
19 changes: 0 additions & 19 deletions csrc/device_lower/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1058,25 +1058,6 @@ void validateLookupTV(Fusion* fusion) {
}
}

void validateResize(Fusion* fusion) {
auto fusion_vals = fusion->usedMathVals();
for (auto tv : ir_utils::filterByType<TensorView>(fusion_vals)) {
// Make sure resize is only used as part of root to logical transformations
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No longer holds

auto rf_to_loop_exprs = StmtSort::getExprsBetween(
{tv->getLogicalDomain().begin(), tv->getLogicalDomain().end()},
{tv->getLoopDomain().begin(), tv->getLoopDomain().end()});

NVF_ERROR(
std::none_of(
rf_to_loop_exprs.begin(),
rf_to_loop_exprs.end(),
[](Expr* expr) { return expr->isA<Resize>(); }),
"Invalid use of resize detected with ",
tv->toString(),
". Resize may only be used as part of root to logical transformations.");
}
}

void validateReductions(Fusion* fusion) {
for (auto rop : ir_utils::getOpsOfType<ReductionOp>(fusion)) {
auto in = rop->in()->as<TensorView>();
Expand Down
3 changes: 0 additions & 3 deletions csrc/device_lower/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ void validateGroupedReductions(Fusion* fusion);
//! Validate all of the lookup TVs are ensured to be fusion inputs
void validateLookupTV(Fusion* fusion);

//! Validate resize usage
void validateResize(Fusion* fusion);

//! Check that there are no reductions over unexpanded broadcasts
void validateReductions(Fusion* fusion);

Expand Down
Loading
Loading