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

allow apply_type_tfunc to handle argtypes with Union #56617

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aviatesk
Copy link
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
Copy link
Member Author

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

@nanosoldier
Copy link
Collaborator

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

Compiler/src/tfuncs.jl Outdated Show resolved Hide resolved
Compiler/src/tfuncs.jl Outdated Show resolved Hide resolved
@aviatesk aviatesk force-pushed the avi/union-apply_type branch 2 times, most recently from 3b35cae to adabb1e Compare November 21, 2024 14:05
aviatesk and others added 3 commits November 22, 2024 03:34
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.
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