Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 6f269fa

Browse files
authored
Merge pull request #182 from facebookresearch/pr/dev/ast_gen_mapped_tensor_access
emitMappedTensorAccess: use isl AST expression generator
2 parents 7f97a60 + 312ae53 commit 6f269fa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/core/polyhedral/codegen_cuda.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -754,13 +754,8 @@ void emitMappedTensorAccess(
754754
auto astToPromoted =
755755
isl::pw_multi_aff(promotion).pullback(astToScheduledOriginal);
756756

757-
auto pma = isl::PMA(astToPromoted);
758-
CHECK_EQ(pma.size(), 1) << "expected one piece, got " << astToPromoted;
759-
auto ma = isl::MA(pma[0].second);
760-
context.ss << promotionInfo.groupId.get_name();
761-
for (int i = 0; i < ma.size(); ++i) {
762-
context.ss << "[" << toString(ma[i]) << "]";
763-
}
757+
auto astBuild = isl::ast_build::from_context(astToPromoted.domain());
758+
context.ss << astBuild.access_from(astToPromoted).to_C_str();
764759
}
765760

766761
void emitDirectSubscripts(

0 commit comments

Comments
 (0)