egraphs-good / extraction-gym

benchmarking e-graph extraction
MIT License
24 stars 15 forks source link

Add Tensat Examples #4

Closed ezrosent closed 1 year ago

ezrosent commented 1 year ago

This PR adds some examples from Tensat. The Tensat repo dynamically estimates costs of certain operators based on the hardware on which it is run. I wrote some code to "scrape" these costs and then write them to the extraction-gym format.

A couple notes on this one:

mwillsey commented 1 year ago

I'm changed the format, but hopefully you can use the convert.py script to easily convert to the new format.

ezrosent commented 1 year ago

Will do! Need to re-merge some of the memoization stuff but that actually looks like it'll be easier to add with the new structure. I should have it done soon.

ezrosent commented 1 year ago

Should be good to go!

mwillsey commented 8 months ago

@ezrosent do you recall the pruning process? #14 notices some cycles present in even the _acyclic variants.

ezrosent commented 8 months ago

I just used https://github.com/uwplse/tensat + the sample code for exporting egg to the extraction-gym format. I don't think I modified tensat at all.

Maybe some of the cycle pruning happens during extraction in tensat? It's also possible that I invoked the tool incorrectly (though the acyclic variants are smaller here, so something is happening at least).

ezrosent commented 8 months ago

I can try and dig up the specific setup I had that generated this (old windows machine with an nvidia GPU), but in the near-term, we can probably just remove the _acyclic egraphs that have cycles in them?