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

[AutoBump] Merge with fixes of 4b3f251b (Oct 11) (12) (Needs torch bump) #449

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

jorickert
Copy link

@jorickert jorickert commented Jan 13, 2025

cxy-1993 and others added 2 commits October 11, 2024 21:59
The concept of a 'program point' in the original data flow framework is
ambiguous. It can refer to either an operation or a block itself. This
representation has different interpretations in forward and backward
data-flow analysis. In forward data-flow analysis, the program point of
an operation represents the state after the operation, while in backward
data flow analysis, it represents the state before the operation. When
using forward or backward data-flow analysis, it is crucial to carefully
handle this distinction to ensure correctness.

This patch refactors the definition of program point, unifying the
interpretation of program points in both forward and backward data-flow
analysis.

How to integrate this patch?

For dense forward data-flow analysis and other analysis (except dense
backward data-flow analysis), the program point corresponding to the
original operation can be obtained by `getProgramPointAfter(op)`, and
the program point corresponding to the original block can be obtained by
`getProgramPointBefore(block)`.

For dense backward data-flow analysis, the program point corresponding
to the original operation can be obtained by
`getProgramPointBefore(op)`, and the program point corresponding to the
original block can be obtained by `getProgramPointAfter(block)`.

NOTE: If you need to get the lattice of other data-flow analyses in
dense backward data-flow analysis, you should still use the dense
forward data-flow approach. For example, to get the Executable state of
a block in dense backward data-flow analysis and add the dependency of
the current operation, you should write:

``getOrCreateFor<Executable>(getProgramPointBefore(op),
getProgramPointBefore(block))``

In case above, we use getProgramPointBefore(op) because the analysis we
rely on is dense backward data-flow, and we use
getProgramPointBefore(block) because the lattice we query is the result
of a non-dense backward data flow computation.

related dsscussion:
https://discourse.llvm.org/t/rfc-unify-the-semantics-of-program-points/80671/8
corresponding PSA:
https://discourse.llvm.org/t/psa-program-point-semantics-change/81479
@jorickert jorickert changed the title [AutoBump] Merge with fixes of 4b3f251b (Oct 11) (12) [AutoBump] Merge with fixes of 4b3f251b (Oct 11) (12) (Needs torch bump) Jan 13, 2025
@jorickert jorickert requested a review from mgehre-amd January 13, 2025 17:38
Base automatically changed from bump_to_5dac691b to bump_to_a1c9dd7c January 20, 2025 09:27
Base automatically changed from bump_to_a1c9dd7c to feature/fused-ops January 22, 2025 08:31
@mgehre-amd mgehre-amd merged commit ca3473c into feature/fused-ops Jan 22, 2025
4 checks passed
@mgehre-amd mgehre-amd deleted the bump_to_4b3f251b branch January 22, 2025 08:31
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