yaoyuannnn / experiments

Experiments for the SMAUG project
0 stars 4 forks source link

Use of xenon generator #2

Open samialabed opened 2 years ago

samialabed commented 2 years ago

Hi,

I was wondering if there is a reason why smaug isn't using the xenon sweeper like the rest of the gem5 ecosystem? Also, the design space exposed in this repo sweeper: https://github.com/yaoyuannnn/experiments/blob/master/sweeps/sweeper.py does not match the one exposed in the gem5-Aladdin one https://github.com/harvard-acc/gem5-aladdin/blob/master/sweeps/benchmarks/params.py (naming mismatch as well as fewer design choices exposed)

Should I add the missing parameters and ensure the naming is consistent between the two of them? Or is xenon deprecated? Alternatively, I think would be simpler to have both smaug and gem5-Aladdin use Xenon but I couldn't find documentation on porting smaug models as a benchmark to Xenon, do you have any pointer on how I can get started doing that?

Thanks!

xyzsam commented 2 years ago

SMAUG should be using the Xenon sweeper, as I mentioned in this PR. Unfortunately, neither of us had the time to port it. We would very much welcome porting the smaug models to Xenon. The MachSuite benchmark suite is a pretty good place to start. See this file which defines all the benchmarks in Python. It should be relatively straightforward. Then this Xenon file is an example of how a sweep could be specified and generated. A few notes:

  1. source-dir is relative to gem5-aladdin/sweeps. So let's say SMAUG is at ../../workspace/smaug - then that's what you would put as the source-dir in the Xenon file. Then when you specify the Benchmark, the builder will cd into that subdirectory. For SMAUG, you don't need that, so it can be blank.
  2. You'll probably have to update this code with the appropriate Makefile targets. It was initially written for SHOC and MachSuite which used a consistent set of Makefile rules. Or you can just add these Make targets to SMAUG too.
  3. You can sweep array partitioning, loop unrolling, cache sizes, etc (anything here). But you can't sweep scratchpad sizes since that would require code changes too.
  4. Per-loop pipelining and unrolling are not supported currently because we wrote the sweep system before those features were added to aladdin, but those could be added to params.py pretty easily too.

Hope this gets you started.