TeCSAR-UNCC / gem5-SALAM

BSD 3-Clause "New" or "Revised" License
84 stars 23 forks source link

enable inter-accelerator pipelining #26

Closed chensx00 closed 1 year ago

chensx00 commented 1 year ago

hello! In your paper, you say gem5-SALAM enable inter-accelerator pipelinng. Can you tell me how to set up scripts or other parts of the code to enable this feature? Thanks!

![Uploading pic.PNG…]()

chensx00 commented 1 year ago

dear, another, i am confused about how to use ini file and pragma. For example, if I want to customize loop pipelining, what should I do? I read the statement in the paper, it seems that SALAM automatically pipelines the loop.

zephan-spencer commented 1 year ago

So, the repo is significantly ahead of the paper, we're actually working on getting another one out, but we've all been really busy with other stuff.

If you want to utilize the original version of gem5-SALAM, you can check out the master branch here: https://github.com/TeCSAR-UNCC/gem5-SALAM/tree/master. This includes a lot of fixes to SALAMv1, and should be pretty stable. Some good benchmarks to look at are FFT and GEMM.

If you're interested in using the newer version (tentatively SALAMv2), take a look at the BFS, LeNet-5, and MobileNetV2 benchmarks. BFS is a great showcase of what wasn't available from a datapath modeling perspective in SALAMv1. LeNet-5 and MobileNetV2 and great examples of how the configurator we have written helps when you have a lot of memory mapped devices.

One thing to note on v2, is that power and area statistics aren't working correctly at the moment. We should have that fix in the next couple of months, but it isn't going to be something that is a quick fix.

zephan-spencer commented 1 year ago

It's also worth noting that in v2 we've ditched the INI files for a YAML file that is parsed by the configurator. There are two sections, one for the gem5 setup (sim .py files and memory map headers), and one for the cacti integration. Don't get intimidated by thousand lines of per FU configs, those are supposed to be optional (with a set default) and we just haven't cleaned them up yet.

zephan-spencer commented 1 year ago

For compiler pragmas, I believe we've just used unroll, but I could be wrong on that.

If you look at v1, the pragmas will be different because of the old LLVM version it uses (3.8) vs. v2 which can support at least 9.0.

See v1: https://github.com/TeCSAR-UNCC/gem5-SALAM/blob/7eb2f2ba769a1b1cbc1f5f58b6c78d8911e67482/benchmarks/sys_validation/gemm/hw/gemm.c#L16

See v2: https://github.com/TeCSAR-UNCC/gem5-SALAM/blob/83fe9408d8587e04e5b78f4c0ca7f9f02ea3386f/benchmarks/sys_validation/gemm/hw/gemm.c#L38

chensx00 commented 1 year ago

Thank you for helping me so much! I'm also looking forward to your new paper.