Skip to content

bpart: Allow inference/codegen to merge multiple partitions #57602

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

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

Keno
Copy link
Member

@Keno Keno commented Mar 2, 2025

When inference and codegen queries the partitions of a binding, they often only care about a subset of the information in the partition. At the moment, we always truncate world ranges to the most precise partition that contains the relevant query. However, we can instead expand the world range to cover all partitions that are equivalent for the given query. To give a concrete example, both inference and codegen never care about the exported flag in a binding partition, so we should not unnecessarily truncate a world range just because an export was introduced.

Further, this commit lays the ground work to stop invalidating code for these same kinds of transitions, although the actual logic to do that will come in a separate PR.

When inference and codegen queries the partitions of a binding, they
often only care about a subset of the information in the partition.
At the moment, we always truncate world ranges to the most precise
partition that contains the relevant query. However, we can instead
expand the world range to cover all partitions that are equivalent
for the given query. To give a concrete example, both inference and
codegen never care about the exported flag in a binding partition, so
we should not unnecessarily truncate a world range just because an
export was introduced.

Further, this commit lays the ground work to stop invalidating code
for these same kinds of transitions, although the actual logic to do
that will come in a separate PR.
@Keno Keno force-pushed the kf/bpartrangemerge branch from cfecce3 to 1f9bce1 Compare March 2, 2025 06:15
@Keno Keno merged commit a5157c0 into master Mar 2, 2025
7 checks passed
@Keno Keno deleted the kf/bpartrangemerge branch March 2, 2025 20:50
@KristofferC
Copy link
Member

Backport or no? For now on, I'll just assume that the things without label are not intended to be backportedl.

@Keno Keno added the backport 1.12 Change should be backported to release-1.12 label Mar 2, 2025
@Keno
Copy link
Member Author

Keno commented Mar 2, 2025

Yeah, backport. It's mostly preparatory for the next PR, which should improve performance and that PR would be good to have on 1.12

Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
Keno added a commit that referenced this pull request Mar 3, 2025
This implements the optimizations I promised in #57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over #57615 is minimal (though non-zero).
KristofferC pushed a commit that referenced this pull request Mar 4, 2025
When inference and codegen queries the partitions of a binding, they
often only care about a subset of the information in the partition. At
the moment, we always truncate world ranges to the most precise
partition that contains the relevant query. However, we can instead
expand the world range to cover all partitions that are equivalent for
the given query. To give a concrete example, both inference and codegen
never care about the exported flag in a binding partition, so we should
not unnecessarily truncate a world range just because an export was
introduced.

Further, this commit lays the ground work to stop invalidating code for
these same kinds of transitions, although the actual logic to do that
will come in a separate PR.

(cherry picked from commit a5157c0)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Mar 24, 2025
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
…g#57602)

When inference and codegen queries the partitions of a binding, they
often only care about a subset of the information in the partition. At
the moment, we always truncate world ranges to the most precise
partition that contains the relevant query. However, we can instead
expand the world range to cover all partitions that are equivalent for
the given query. To give a concrete example, both inference and codegen
never care about the exported flag in a binding partition, so we should
not unnecessarily truncate a world range just because an export was
introduced.

Further, this commit lays the ground work to stop invalidating code for
these same kinds of transitions, although the actual logic to do that
will come in a separate PR.
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
This implements the optimizations I promised in JuliaLang#57602 by checking
in invalidation whether or not the information that inference sees
changes. The primary situation in which this is useful is avoiding
an invalidation for `export` flag changes or changes of which module
a binding is being imported from that do not change what the actual
binding being imported is. Base itself uses these patterns sparingly,
so the bootstrap impact over JuliaLang#57615 is minimal (though non-zero).
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.

2 participants