This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-23
lines changed Expand file tree Collapse file tree 4 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -648,8 +648,7 @@ isl::ast_node collectIteratorMaps(
648
648
scop.halide .statements .at (stmtId).as <Halide::Internal::Provide>();
649
649
for (auto e : provide->args ) {
650
650
const auto & map = iteratorMap;
651
- auto space = map.get_space ().params ();
652
- auto aff = scop.makeIslAffFromStmtExpr (stmtId, space, e);
651
+ auto aff = scop.makeIslAffFromStmtExpr (stmtId, e);
653
652
auto pulled = isl::pw_aff (aff).pullback (map);
654
653
TC_CHECK_EQ (pulled.n_piece (), 1 );
655
654
subscripts.push_back (build.expr_from (pulled));
Original file line number Diff line number Diff line change @@ -136,8 +136,7 @@ struct CodegenStatementContext : CodegenContext {
136
136
// of the variables does not correspond to a parameter or
137
137
// an instance identifier of the statement.
138
138
isl::aff makeIslAffFromExpr (const Halide::Expr& e) const {
139
- auto space = iteratorMap ().get_space ().params ();
140
- return scop ().makeIslAffFromStmtExpr (statementId (), space, e);
139
+ return scop ().makeIslAffFromStmtExpr (statementId (), e);
141
140
}
142
141
143
142
isl::id astNodeId;
Original file line number Diff line number Diff line change @@ -503,18 +503,12 @@ const Halide::OutputImageParam& Scop::findArgument(isl::id id) const {
503
503
return *halide.inputs .begin ();
504
504
}
505
505
506
- isl::aff Scop::makeIslAffFromStmtExpr (
507
- isl::id stmtId,
508
- isl::space paramSpace,
509
- const Halide::Expr& e) const {
510
- auto tuple = halide.domains .at (stmtId).tuple ;
511
- auto space = paramSpace.named_set_from_params_id (stmtId, tuple.size ());
512
- // Set the names of the set dimensions of "space" for use
513
- // by halide2isl::makeIslAffFromExpr.
514
- for (int i = 0 ; i < tuple.size (); ++i) {
515
- space = space.set_dim_id (isl::dim_type::set, i, tuple.get_id (i));
516
- }
517
- return halide2isl::makeIslAffFromExpr (space, e);
506
+ isl::aff Scop::makeIslAffFromStmtExpr (isl::id stmtId, const Halide::Expr& e)
507
+ const {
508
+ auto domain = halide.domains .at (stmtId);
509
+ auto aff = halide2isl::makeIslAffFromExpr (domain.paramSpace , e);
510
+ aff = aff.unbind_params_insert_domain (domain.tuple );
511
+ return aff;
518
512
}
519
513
520
514
} // namespace polyhedral
Original file line number Diff line number Diff line change @@ -411,15 +411,11 @@ struct Scop {
411
411
const Halide::OutputImageParam& findArgument (isl::id id) const ;
412
412
413
413
// Make an affine function from a Halide Expr that is defined
414
- // over the instance set of the statement with identifier "stmtId" and
415
- // with parameters specified by "paramSpace". Return a
416
- // null isl::aff if the expression is not affine. Fail if any
414
+ // over the instance set of the statement with identifier "stmtId".
415
+ // Return a null isl::aff if the expression is not affine. Fail if any
417
416
// of the variables does not correspond to a parameter or
418
417
// an instance identifier of the statement.
419
- isl::aff makeIslAffFromStmtExpr (
420
- isl::id stmtId,
421
- isl::space paramSpace,
422
- const Halide::Expr& e) const ;
418
+ isl::aff makeIslAffFromStmtExpr (isl::id stmtId, const Halide::Expr& e) const ;
423
419
424
420
// Promote a tensor reference group to a storage of a given "kind",
425
421
// inserting the copy
You can’t perform that action at this time.
0 commit comments