Skip to content
Draft
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
23 changes: 1 addition & 22 deletions csrc/fusion_segmenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,29 +1762,8 @@ void eraseInputDistinctRootDomains(Fusion* fusion) {
auto logical = tv->getLogicalDomain();
new_logical_domain.reserve(logical.size());

// Does the logical domain contain all concrete sized extents?
bool tv_is_concrete = true;
for (auto id : logical) {
if (!id->extent()->isConstScalar()) {
tv_is_concrete = false;
break;
}
}

for (const auto& id : logical) {
if (id->isRFactorProduct()) {
// Create new symbolic extents for logical iterDomains
auto domain_extent = (!tv_is_concrete)
? IrBuilder::create<Val>(DataType::Index)
: id->extent();
replacement_map.emplace(id->extent(), domain_extent);
new_logical_domain.push_back(IterDomainBuilder(id)
.extent(domain_extent)
.resetSchedulingParams()
.build());
} else {
new_logical_domain.push_back(id->cloneWithoutRFactor());
}
new_logical_domain.push_back(id->cloneWithoutRFactor());
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's possible that segmentation changed since #630 was merged. One thing that changed is introduction of the ExprEval scheduler which now evaluates some of the segments so it won't hit the issue. I think we should look at that test DynamicTransformIssue418 and sprinkle in some pointwise ops to trigger the segmentation between two codegen'd segments again.

As to your change, it removes only the rFactor product flag and does not mark the extents for replacement, which would open us up to #418 and #629 again I think.

}

TensorDomain* new_td = nullptr;
Expand Down