Skip to content
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

Functions and axis tags don't get along #470

Open
majosm opened this issue Nov 10, 2023 · 1 comment
Open

Functions and axis tags don't get along #470

majosm opened this issue Nov 10, 2023 · 1 comment

Comments

@majosm
Copy link
Collaborator

majosm commented Nov 10, 2023

The current implementation of unify_axes_tags doesn't play well with expressions containing function calls. Due to the possibility that the function could be something generic that accepts inputs of varying shapes (e.g. a + b), it's not allowed to propagate axis tags into/out of function definitions. This means that calls must be inlined before axis tag propagation can occur (which is OK for now, but we'll need to revisit this later).

@inducer
Copy link
Owner

inducer commented Nov 10, 2023

Upon thinking about this more, I think varying shapes are not an issue---pytato DAGs are always shape-specific (though parameters are technically allowed as part of shapes). So propagating tags out of a function should always be fine, but propagating into is not, because a function may be called from several call sites, which may disagree about how to tag things.

At any rate, thanks for getting this issue filed, @majosm!

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

No branches or pull requests

2 participants