You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2023. It is now read-only.
makeScheduleTree: also extract polyhedral representation of reductions
Reductions are currently represented by lists of reduction dimensions
in the domains of the reduction update statements.
The detection of reductions in the schedule tree, based on this information,
may work out in practice, but it is difficult to reason about and
is technically incorrect.
This detection will be replaced by one that is based
on a polyhedral representation. This commit introduces
this polyhedral representation.
In particular, each individual reduction (a set of updates
to a given tensor element) is represented by an element
in a reduction space, along with a mapping from the
update statement instances that contribute to that reduction.
The obvious choice for such a reduction space would be
the space of the tensor involved in the reduction.
However, there may in theory be multiple reductions
on the same tensor element separated by some other statement,
even though this is currently impossible inside TC.
Still, since the reductions are extracted from Halide,
it's best to only use information available in the Halide
representation and to not assume an identity matching
between reductions and tensor elements.
It is not immediately obvious what would be the best representation
for reductions. This commit uses an isl::union_map representation,
but an isl::union_pw_multi_aff would also work.
This commit only extracts a polyhedral representation of reductions,
temporarily resulting in a duplicate representation of reductions.
After all uses of the AST representation of reductions have been
replaced by uses of the polyhedral representation, the AST representation
will be removed.
0 commit comments