Accelergy-Project / timeloop-accelergy-exercises

Exercises for exploring the Fibertree, Timeloop and Accelergy tools
MIT License
85 stars 29 forks source link

Question) Is there a way to control the weight precision in CONV tutorial? #58

Open a2jinhee opened 2 weeks ago

a2jinhee commented 2 weeks ago

Hello, thank you for sharing this great work! I’m new to Timeloop and currently working through the tutorial exercises. I have a question on how to adjust the operand precision.

In exercise 06-mapper-convlayer-eyeriss, I want to compare the power consumption between two scenarios: 1) Load FP32 weights from DRAM into the weight scratchpad, and do 4b weight x 4b input convolution. 2) Load INT8 weights from DRAM into the weight scratchpad, and do 4b weight x 4b input convolution.

I know that there is a datawidth attribute for each level of architecture hierarchy, but I'm not entirely sure how to use this for what I'm intending. Do I just need to change datawidth attribute to DRAM(32)-weight scratchpad(32),input scratchpad(32)-MAC unit(4) for case 1, and DRAM(8)-weight scratchpad(8),input scratchpad(8)-MAC unit(4) for case 2, respectively?