-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements a reindexing transformation #636
base: main
Are you sure you want to change the base?
Conversation
That academia.edu link doesn't seem to work. |
Oops thanks, fixed! |
7408b01
to
dbe1ded
Compare
ef0781d
to
794b7cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A few concerns, nothing major. Good to merge once those are resolved.
loopy/transform/reindexing.py
Outdated
caller that the returned kernel object would be a derivative of GPL | ||
licensed work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't quite match my understanding of how that works. It's the transform code that is a derivative of a GPL work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this code nor the a code that is distributed and unconditionally uses this routine becomes GPL is my understanding. I've included a note as a comment highlighting this. Dropped this warning/function argument altogether.
loopy/transform/reindexing.py
Outdated
ISLMapT = Union[isl.BasicMap, isl.Map] | ||
ISLSetT = Union[isl.BasicSet, isl.Set] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far, we've reserved T
suffix types for type variables, with (some?) consistency. Maybe just ISLMap
? Or ISLMapLike
? Reading more below, I think we want both the variable-and non-variable versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with (some?) consistency
I don't think that's true:
Lines 30 to 38 in 34c7344
IntegralT = Union[int, np.int8, np.int16, np.int32, np.int64, np.uint8, | |
np.uint16, np.uint32, np.uint64] | |
FloatT = Union[float, complex, np.float32, np.float64, np.complex64, | |
np.complex128] | |
ExpressionT = Union[IntegralT, FloatT, Expression] | |
ShapeType = Tuple[ExpressionT, ...] | |
StridesType = ShapeType |
loopy/transform/reindexing.py
Outdated
return isl_map | ||
|
||
|
||
def _get_seghir_loechner_reindexing_from_range(access_range: ISLSetT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a potential ambiguity here in terms of variable ordering. Is that something we should expose to the user? (One floor up we could try to look at the strides, though we're out of luck if those are symbolic, at which point it's back to user input.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I get the ambiguity here. Irrespective of the variable ordering the access ranges should be the same, right?
a1a8fb6
to
7b2f9d7
Compare
7b2f9d7
to
736c415
Compare
736c415
to
88aecb4
Compare
88aecb4
to
80c8820
Compare
80c8820
to
a593347
Compare
a593347
to
da17876
Compare
da17876
to
1a0d21b
Compare
The implementation here is based on the paper "Memory optimization by counting points in integer transformations of parametric polytopes".
Draft because:
pw_qpolynomial_to_expr