Closed ezrosent closed 1 year ago
I'm changed the format, but hopefully you can use the convert.py
script to easily convert to the new format.
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.
Should be good to go!
@ezrosent do you recall the pruning process? #14 notices some cycles present in even the _acyclic
variants.
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).
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?
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:
nasneta
examples here. I dug into this a bit and found that we were spending all of the time intree_cost
: the fix is to memoize duplicate calls intree_cost
anddag_cost
. Things finish pretty fast after that.