This repository was archived by the owner on Apr 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
use templated isl types #604
Open
skimo-openhub
wants to merge
85
commits into
facebookresearch:master
Choose a base branch
from
skimo-openhub:pr/template2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
use templated isl types #604
skimo-openhub
wants to merge
85
commits into
facebookresearch:master
from
skimo-openhub:pr/template2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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. |
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.
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.
a61a729
to
29581f1
Compare
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.