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 validated a mapping found by Timeloop in ZigZag? #27

Closed morainer closed 3 months ago

morainer commented 8 months ago

How can I validated a mapping found by Timeloop in ZigZag? I can only set the spatial mapping and temporal mapping respectively. But I find that I can not allocate the memory level at the exact loop of the mapping as I wish. So I can not get the result that Zigzag can obtain energy that are approximate to the Timeloop.

asyms commented 8 months ago

Hi,

I don't understand your question completely. Could you provide a MWE?

The ZigZag spatial and temporal mapping representations work on a memory-level basis, so if you hardcode the loops in each level, that should achieve what you're after?

Kind regards, Arne

morainer commented 8 months ago

Hi,

Sorry, maybe my expression is wrong.

When we obtain a mapping in TimeLoop, I want to transform this timeloop mapping into Zigzag way, so that I can run the same mapping both in TimeLoop and Zigzag and then get the results of them. However, when I divide the timeloop mapping into spatial and temporal mappings and input them into zigzag and run it in debug mode, I observe that the loops on each memory level do not align with the timeloop mapping. So the energy results of timeloop and zigzag are quite different.

Therefore, I cannot reproduce the result that Zigzag can obtain energy that are approximate to the Timeloop, which mentioned in the verification paper of zigzag. As shown in the figure below.

image

I wonder that if there are other ways to solve such problem?

asyms commented 8 months ago

I understand what you're trying to achieve, but can you elaborate on "I observe the loops on each memory level do not align with the timeloop mapping"? A MWE will help me pinpoint the difference.

morainer commented 8 months ago

tlzz.zip Okay, here is an example that I try converting a Timeloop mapping into a Zigzag mapping, but I'm not sure if the conversion is correct. If it is wrong, could you please help me point out the error. Thank you very much.

JiacongSun commented 3 months ago

Hi morainer,

I've noticed several errors in your configurations:

Please review these discrepancies and adjust your settings accordingly. Let me know if you need further assistance.

Best regards, Jiacong

asyms commented 3 months ago

Closing due to inactivity