Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
naoyam committed Aug 30, 2024
1 parent 9ee0fad commit a99d5af
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions csrc/device_lower/analysis/sync_information.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,16 +689,18 @@ SyncMap::SyncMap(Fusion* fusion) {
}

if (GpuLower::current()->hasIdModel()) {
const auto& id_model = GpuLower::current()->idModel();
auto producer_loop_id =
indexing_utils::getLoopPromotion(p_id, id_model);
auto consumer_loop_id =
indexing_utils::getLoopPromotion(c_id, id_model);
const auto& indexing_traveral_graph =
id_model.idGraph(IdMappingMode::ALMOSTEXACT);
if (indexing_traveral_graph.disjointValSets().strictAreMapped(
producer_loop_id, consumer_loop_id)) {
continue;
if (producer_ptype == consumer_ptype) {
const auto& id_model = GpuLower::current()->idModel();
auto producer_loop_id =
indexing_utils::getLoopPromotion(p_id, id_model);
auto consumer_loop_id =
indexing_utils::getLoopPromotion(c_id, id_model);
const auto& indexing_traveral_graph =
id_model.idGraph(IdMappingMode::ALMOSTEXACT);
if (indexing_traveral_graph.disjointValSets().strictAreMapped(
producer_loop_id, consumer_loop_id)) {
continue;
}
}
} else {
if (producer_ptype == consumer_ptype &&
Expand Down

0 comments on commit a99d5af

Please sign in to comment.