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

Make rulesets delayed (and refactor) #130

Merged
merged 50 commits into from
Mar 28, 2024
Merged

Make rulesets delayed (and refactor) #130

merged 50 commits into from
Mar 28, 2024

Conversation

saulshanabrook
Copy link
Member

This PR was started to try to make ruleset registrations delayed, so that they could refer to types that have not been defined yet in the file.

For example, in the array_api.py file, if we have a method of Bool that takes Ints, we want to be able to define that and define the rewrite rules for Bool before the Int is defined.

We do this now by deferring type analysis and rule parsing until a ruleset is used, instead of when it was defined.

Along the way, I ended up cleaning up a bunch of constructs that were left over from the last larger refactor (#108, #111), which moved functions/classes away from the EGraph.

Copy link

codspeed-hq bot commented Mar 27, 2024

CodSpeed Performance Report

Merging #130 will degrade performances by 16.6%

Comparing refactor (2b25475) with main (df4e1d8)

Summary

❌ 1 (👁 1) regressions
✅ 6 untouched benchmarks

Benchmarks breakdown

Benchmark main refactor Change
👁 test_source_optimized 42.9 s 51.4 s -16.6%

@saulshanabrook saulshanabrook merged commit f460d74 into main Mar 28, 2024
13 checks passed
@saulshanabrook saulshanabrook deleted the refactor branch March 28, 2024 01:32
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.

1 participant