Skip to content

allow apply_type_tfunc to handle argtypes with Union#56617

Merged
aviatesk merged 3 commits intomasterfrom
avi/union-apply_type
Nov 22, 2024
Merged

allow apply_type_tfunc to handle argtypes with Union#56617
aviatesk merged 3 commits intomasterfrom
avi/union-apply_type

Conversation

@aviatesk
Copy link
Copy Markdown
Member

This is an alternative to #56532 and can resolve #31909. Currently apply_type_tfunc is unable to handle Union-argtypes with any precision. With this change, apply_type_tfunc now performs union-splitting on Union-argtypes and returns the merged result of the splits.
While this can improve inference precision, we might need to be cautious about potential inference time bloat.

@aviatesk aviatesk force-pushed the avi/union-apply_type branch from dcd8170 to c6fde6d Compare November 20, 2024 11:21
@aviatesk
Copy link
Copy Markdown
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Copy Markdown
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk requested a review from vtjnash November 20, 2024 16:29
@aviatesk aviatesk force-pushed the avi/union-apply_type branch 3 times, most recently from adabb1e to 57aa8e5 Compare November 21, 2024 18:34
aviatesk and others added 3 commits November 22, 2024 13:47
This is an alternative to #56532 and can resolve #31909.
Currently `apply_type_tfunc` is unable to handle `Union`-argtypes with
any precision. With this change, `apply_type_tfunc` now performs
union-splitting on `Union`-argtypes and returns the merged result of
the splits.
While this can improve inference precision, we might need to be cautious
about potential inference time bloat.
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@aviatesk aviatesk force-pushed the avi/union-apply_type branch from 57aa8e5 to 2964a3d Compare November 22, 2024 04:48
@aviatesk aviatesk merged commit 1bf2ef9 into master Nov 22, 2024
@aviatesk aviatesk deleted the avi/union-apply_type branch November 22, 2024 07:05
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
…6617)

This is an alternative to JuliaLang#56532 and can resolve JuliaLang#31909.
Currently `apply_type_tfunc` is unable to handle `Union`-argtypes with
any precision. With this change, `apply_type_tfunc` now performs
union-splitting on `Union`-argtypes and returns the merged result of the
splits.
While this can improve inference precision, we might need to be cautious
about potential inference time bloat.

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
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.

Suboptimal performance of captured small unions

3 participants