gussmith23 / glenside

A pure, low-level tensor program representation enabling tensor program optimization via program rewriting. See the web demo at https://gussmith23.github.io/glenside-web-demo/
71 stars 10 forks source link

Benchmark interpreter so that we can measure improvement #33

Closed gussmith23 closed 4 years ago

gussmith23 commented 4 years ago

@hypercubestart I think this is the right place to start. Partly because it's the first thing we need to do to improve the interpreter, but also because it will get you acquainted with the interpreter, and involves utilizing a feature of Rust/Cargo (one that I've never actually used, so you might have to explain it to me...)

Here's what I suggest:

  1. Take a look at/run the interpreter tests (bottom of the file)..
  2. Read up on Rust's benchmark tests
  3. See if you can modify the interpreter tests to be benchmarks as well! Or, maybe we need to create separate benchmark tests. Unsure -- let me know what you think
gussmith23 commented 4 years ago

While you're working on this one, you might also want to think about #26 -- while you're benchmarking, you might come up with a clever way to use Rust macros to rewrite the tests compactly. See that issue for more notes.

hypercubestart commented 4 years ago

@gussmith23 benchmarking is an unstable feature in Rust. I think if we want benchmarking, we need to use the nightly build of Rust and compile with -Z unstable-options falg. Are you okay with this?

gussmith23 commented 4 years ago

yes! I think I'm actually already using nightly rust on my machine. it seems like using nightly is super common in the rust world... I'd honestly say I see more people talking about using nightly than stable