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

Intersect: try normal+reverse+existential subtyping during intersection #57476

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

N5N3
Copy link
Member

@N5N3 N5N3 commented Feb 20, 2025

Typevars are all existential (in the sense of variable lb/ub) during intersection. This fix is somehow costly as we have to perform 3 times check to prove a false result. But a single existential <: seems too dangerous as it cause many circular env in the past.
fix #57429
fix #41561

@N5N3 N5N3 added types and dispatch Types, subtyping and method dispatch bugfix This change fixes an existing bug needs pkgeval Tests for all registered packages should be run with this change labels Feb 20, 2025
@N5N3 N5N3 marked this pull request as draft February 20, 2025 13:58
fix JuliaLang#57429 JuliaLang#41561
Typevars are all existential (in the sense of variable lb/ub) during intersection. This fix is somehow costly as we have to perform 3 times check to prove a false result. But a single existential <: seems too dangerous as it cause many circular env in the past.
@N5N3 N5N3 marked this pull request as ready for review February 20, 2025 14:30
@adienes
Copy link
Member

adienes commented Feb 20, 2025

This fix is somehow costly

would it make sense to include an example snippet benchmarking this cost? even if it is a regression it could be tracked for later improvement

@N5N3
Copy link
Member Author

N5N3 commented Feb 21, 2025

I tried some packages, e.g.

julia> @time using DifferentialEquations
10.825558 seconds (19.42 M allocations: 1.040 GiB, 9.68% gc time, 6.35% compilation time)       # before
10.814457 seconds (19.40 M allocations: 1005.084 MiB, 6.78% gc time, 4.93% compilation time) # after

The influence seems negligible here, but not sure if it's representative.

@N5N3
Copy link
Member Author

N5N3 commented Feb 21, 2025

@nanosoldier runtests()

@oscardssmith
Copy link
Member

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

@nanosoldier
Copy link
Collaborator

The package evaluation job you requested has completed - possible new issues were detected.
The full report is available.

Report summary

❗ Packages that crashed

2 packages crashed only on the current version.

  • An internal error was encountered: 1 packages
  • A segmentation fault happened: 1 packages

7 packages crashed on the previous version too.

✖ Packages that failed

20 packages failed only on the current version.

  • Package tests unexpectedly errored: 1 packages
  • Tests became inactive: 1 packages
  • Test duration exceeded the time limit: 18 packages

1160 packages failed on the previous version too.

✔ Packages that passed tests

22 packages passed tests only on the current version.

  • Other: 22 packages

5368 packages passed tests on the previous version too.

~ Packages that at least loaded

11 packages successfully loaded only on the current version.

  • Other: 11 packages

2831 packages successfully loaded on the previous version too.

➖ Packages that were skipped altogether

1 packages were skipped only on the current version.

  • Package could not be installed: 1 packages

909 packages were skipped on the previous version too.

@nanosoldier
Copy link
Collaborator

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

@vtjnash
Copy link
Member

vtjnash commented Feb 26, 2025

Looks like there was about an equal number of slow packages that got even slower as slow packages that got a little faster. The only one that seemed maybe interesting to look into more is Miter, since it went from several minutes to several hours, to see if this is at fault and if anything can be done.

@N5N3
Copy link
Member Author

N5N3 commented Mar 2, 2025

@nanosoldier runtests(["MapTiles", "Malt", "HistogramThresholding", "GraphViz", "SciMLBase", "Miter", "IMASdd", "EnergyModelsHydrogen", "ImageQualityIndexes", "OrdinaryDiffEqRosenbrock", "AstrodynamicalModels", "EverySingleStreet", "ConceptualClimateModels", "LowRankIntegrators", "SurfaceCoverage", "ControlBarrierFunctions", "HiQGA", "DegreesOfFreedom", "BloqadeODE", "BloqadeGates", "VlasovMethods", "HPCMod"])

@N5N3
Copy link
Member Author

N5N3 commented Mar 2, 2025

Failed to reproduce regression of Miter locally.
Let's check again to see if it's random noise.

@nanosoldier
Copy link
Collaborator

The package evaluation job you requested has completed - no new issues were detected.
The full report is available.

Report summary

✖ Packages that failed

3 packages failed on the previous version too.

✔ Packages that passed tests

10 packages passed tests on the previous version too.

~ Packages that at least loaded

9 packages successfully loaded on the previous version too.

@N5N3 N5N3 added backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 and removed needs pkgeval Tests for all registered packages should be run with this change labels Mar 5, 2025
@N5N3 N5N3 merged commit beb928b into JuliaLang:master Mar 6, 2025
12 of 14 checks passed
@N5N3 N5N3 deleted the trial branch March 6, 2025 15:15
KristofferC pushed a commit that referenced this pull request Mar 11, 2025
…on (#57476)

Typevars are all existential (in the sense of variable lb/ub) during
intersection. This fix is somehow costly as we have to perform 3 times
check to prove a false result. But a single existential <: seems too
dangerous as it cause many circular env in the past.
fix #57429
fix #41561

(cherry picked from commit beb928b)
@KristofferC KristofferC mentioned this pull request Mar 11, 2025
45 tasks
KristofferC pushed a commit that referenced this pull request Mar 11, 2025
…on (#57476)

Typevars are all existential (in the sense of variable lb/ub) during
intersection. This fix is somehow costly as we have to perform 3 times
check to prove a false result. But a single existential <: seems too
dangerous as it cause many circular env in the past.
fix #57429
fix #41561

(cherry picked from commit beb928b)
@KristofferC KristofferC mentioned this pull request Mar 11, 2025
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 bugfix This change fixes an existing bug types and dispatch Types, subtyping and method dispatch
Projects
None yet
5 participants