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

use templated isl types #604

Open
wants to merge 85 commits into
base: master
Choose a base branch
from

Conversation

skimo-openhub
Copy link
Contributor

Templated isl types keep track of the number and nature of tuples
in the spaces of an isl object as well as (optionally)
their internal structure. This allows the compiler
to check whether it makes sense to combine pairs of objects.

In particular, also build this target when WITH_BINDINGS is not set.
In this case, it currently does nothing and does not depend
on anything, but the availability of an unconditional target
will make it possible to reuse this target to also build
the templated isl header in the next commit, independently
of the WITH_BINDINGS setting.
@facebook-github-bot
Copy link

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.

Sven Verdoolaege added 27 commits September 11, 2018 13:05
Templated isl types keep track of the number and nature of tuples
in the spaces of an isl object as well as (optionally)
their internal structure.  This allows the compiler
to check whether it makes sense to combine pairs of objects.

Static methods are matched based on their return kind.
That is, when using static methods, the user needs
to provide template arguments that correspond to
the return value.  It is not clear if this is always
the most obvious/convenient choice.

If fact, since static methods require the user
to explicitly specify the template arguments,
they are not very convenient to use.
Some static methods therefore also give rise
to more convenient, non-static methods in the templated interface.
In particular, for each (static) "from" method,
a "to*" method is added to the class of the argument of the method.
Similarly, for each conversion constructor,
an "as*" method is introduced.
The difference between "to*" and "as*" is the same
as the difference between "from" and conversion,
where the "from" method may lose information, while
conversion does not.

The use of templates to keep track of the number and
internal structure of spaces of isl objects has been
applied before in an unpublished C++ library by
Armin Größlinger.
This function will be templated on the mapping type and therefore
needs to move to a header file.
First move it in its original form to make it easier to see
the differences later on.
This function will be templated on the prefix type and therefore
needs to move to a header file.
First move it in its original form to make it easier to see
the differences later on.
This function will be templated on the target type and therefore
needs to move to a header file.
First move it in its original form to make it easier to see
the differences later on.
This function will be templated on the schedule type and therefore
needs to move to a header file.
First move it in its original form (with an extra "using")
to make it easier to see the differences later on.
This function will be templated on the schedule type and therefore
needs to move to a header file.
First move it in its original form to make it easier to see
the differences later on.
This function will be templated on the schedule type and therefore
needs to move to a header file.
First move it in its original form (with an extra "using")
to make it easier to see the differences later on.
These functions will be templated on the schedule type and therefore
need to move to a header file.
First move them in their original form to make it easier to see
the differences later on.
This function will be templated on the schedule type and therefore
needs to move to a header file.
First move it in its original form (with an extra "using")
to make it easier to see the differences later on.
This will make it easier to gradually introduce the use of templated
isl types by breaking a cycle.
The explicit cast will be removed again after the core halide2isl
has been converted to templated isl types.
…:Space<>

This will make it easier to gradually introduce the use of templated
isl types by breaking a cycle.
The explicit cast will be removed again after Scop::Domain()
has been converted to templated isl types.
This will make it easier to gradually introduce the use of templated
isl types by breaking a cycle.
The explicit cast will be removed again after Scop::Domain()
has been converted to templated isl types.
Use explicit API calls instead of operators because the use of aff_set
is confusing (at least to the author of this commit).
The conversion to an isl::PwAff is needed because, unlike the Python
bindings, the C++ bindings do not have a class hierarchy.
The conversion could also be avoided by introducing
an isl_aff_zero_set in isl.
…tion

This allows halide2isl::makeIslAffFromExpr to be converted
to templated isl types without having to convert tensorElementsSet
at the same time.  Automatic type deduction will be reintroduced
when tensorElementsSet is converted.
This allows halide2isl::makeIslAffFromExpr to be converted
to templated isl types without having to convert Scop::makeIslAffFromStmtExpr
at the same time.  Automatic type deduction will be reintroduced
when Scop::makeIslAffFromStmtExpr is converted.
Now that halide2isl::makeParamContext has been converted
to templated isl types, the cast is no longer required.
This commit introduces a cast, which will be removed after
schedule trees have been converted to templated isl types.
Now that Scop::Domain() has been converted to templated isl types,
the cast is no longer required.
Now that Scop::Domain() has been converted to templated isl types,
the cast is no longer required.
Use explicit API calls instead of operators because the use of aff_set
is confusing (at least to the author of this commit).
The conversions to isl::PwAff are needed because, unlike the Python
bindings, the C++ bindings do not have a class hierarchy.
The conversions could also be avoided by introducing
an isl_aff_nonneg_set and an isl_aff_pos_set in isl.
An explicit cast is introduced in partialScheduleMupa,
which will be removed after the schedule tree has been converted
to templated isl types.
Automatic type deduction is temporarily turned off in promoteToSharedBelow
to avoid having to convert the entire promoteToSharedBelow
together with partialScheduleMupa.  It will be reintroduced
after the schedule tree has been converted to templated isl types.
Sven Verdoolaege added 27 commits September 11, 2018 13:09
This allows outputRanges to be converted
to templated isl types without having to convert
TensorReferenceGroup::promotion at the same time.
Automatic type deduction will be reintroduced
when TensorReferenceGroup::promotion is converted.
Since removeRangeStrides has not been converted yet,
a separate variable is introduced to store its result.
Since ScopedFootprint::strideOffsets is modified,
TensorReferenceGroup::promotion needs some modifications too.
This allows TensorReferenceGroup.originalAccesses() to be converted
to templated isl types without having to convert
accessSubscriptsAreUnrolledLoops at the same time.
Automatic type deduction will be reintroduced
when accessSubscriptsAreUnrolledLoops is converted.
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants