Skip to content

Misc. fixes from concatenation - #512

Merged
inducer merged 4 commits into
inducer:mainfrom
majosm:misc-fixes-from-concatenation
Jul 18, 2024
Merged

inducer merged 4 commits into
inducer:mainfrom
majosm:misc-fixes-from-concatenation

Conversation

@majosm

@majosm majosm commented Jul 2, 2024

Copy link
Copy Markdown
Collaborator

A few small fixes from the WIP concatenation branch that don't fit anywhere else.

@majosm majosm mentioned this pull request Jul 12, 2024
1 task
@majosm
majosm force-pushed the misc-fixes-from-concatenation branch from 6852b86 to 9427bda Compare July 12, 2024 12:55

@inducer inducer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one question, out of curiosity, mostly.

(1,)*i_adv_indices[0]+adv_idx_shape))

if not idx.tags_of_type(AssumeNonNegative):
if axis_len > 1 and not idx.tags_of_type(AssumeNonNegative):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some context here? (Maybe in a comment?) Under what circumstances was this relevant?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this need for simplification arose while we were indexing into a 1-long axes and not because we were allowing building advanced indexing expressions into a 0-long axis. :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Well, at one point IIRC I was seeing index lambdas with a lot of unnecessary % 1s in their exprs. But now I'm no longer able to reproduce that. Maybe it was just being triggered by something else that was wrong in an intermediate version of the concatenation code, that has since been fixed? 🤷‍♂️ I've reverted the change for now, I can make a new PR if I run into it again.

@kaushikcfd kaushikcfd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment thread pytato/array.py
(1,)*i_adv_indices[0]+adv_idx_shape))

if not idx.tags_of_type(AssumeNonNegative):
if axis_len > 1 and not idx.tags_of_type(AssumeNonNegative):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this need for simplification arose while we were indexing into a 1-long axes and not because we were allowing building advanced indexing expressions into a 0-long axis. :)

@majosm
majosm force-pushed the misc-fixes-from-concatenation branch from 9427bda to 384a742 Compare July 15, 2024 19:19
@majosm
majosm marked this pull request as ready for review July 15, 2024 20:29
@majosm
majosm requested a review from inducer July 15, 2024 20:51
Comment thread pytato/distributed/nodes.py
@majosm majosm mentioned this pull request Jul 17, 2024
@majosm
majosm force-pushed the misc-fixes-from-concatenation branch from 384a742 to e89a8d5 Compare July 18, 2024 14:57
@inducer
inducer enabled auto-merge (squash) July 18, 2024 15:04
@inducer

inducer commented Jul 18, 2024

Copy link
Copy Markdown
Owner

Thx!

@inducer
inducer merged commit 180243e into inducer:main Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants