KULeuven-MICAS / zigzag

HW Architecture-Mapping Design Space Exploration Framework for Deep Learning Accelerators
https://kuleuven-micas.github.io/zigzag/
MIT License
90 stars 31 forks source link

How can I use the ARCHITECTURE GENERATOR mentioned in the paper of zigzag #22

Closed morainer closed 9 months ago

morainer commented 9 months ago

I can not find any code or document that describe the details of the ARCHITECTURE GENERATOR. Could you offer an example for me? PS: The paper of zigzag is https://ieeexplore.ieee.org/document/9360462#:~:text=This%20article%20introduces%20ZigZag%2C%20a%20rapid%20DSE%20framework,uneven%20mapping%20opportunities%20and%20smart%20mapping%20search%20strategies.

morainer commented 9 months ago

image

BTW, according to the calculating method mentioned in the paper, I think that the MAC operation inside of each PE should be 320 but not 1600, as the FYu 5 LOOP is a spatial reuse factor and it should not be considered. Please let me know where I got it wrong.

asyms commented 9 months ago

Hi,

The architecture generator as described in the original paper isn't directly available as a Stage but can be created to your liking by modifying the OperationalArray and MemoryHierarchy into a new Core and Accelerator. You can read more here and an example of modifying the architecture can be found here, where the PE array is scaled with a given factor.

Regarding the MAC count inside each PE, I believe you are correct. @LY-Mei can you confirm?

morainer commented 9 months ago

Very appreciate to receive your answers. I will wait for @LY-Mei ‘s confirmation. And, would you like to offer me an example to use the PEArrayScalingStage?

asyms commented 9 months ago

You can use it through this API call here.

LY-Mei commented 9 months ago

Yes, you are right. The MAC operation inside of each PE should be 320. Thanks for catching it!