Hi,
I was looking at the answer to the question posted 3 years ago, which tries to explain what 8x8 MACs mean in the Ethos NPUs specs.
What does the MACs(8x8) of Ethos-U55 specification mean?
I will copy past the core of the accepted answer:
"
Let me explain in more detail with considering 256 MAC config.
256 MAC config means that can do 256 8x8 multiplications per cc. A MAC counts as two operations (mul+add).
Suppose you have a network of 8 bit IFM. for e.g
INPUT : 10 * 10 * 3
Convolution : 128*3*3*3 (3x3x3 (HxWxD) kernel and 128 filter) (Same pad)
Output shape: 8*8*128
MAC = 8*8*128*3*3*3 = ~221184 MACs
Now, 256 8*8 MAC can happen in one clock cycle. So, you would need 221184/256 = ~864 cc for computing these MAC's.
1. If 221184 MACs is divided by 256 MACs then where does the 8x8 part come in? That is just dividing total MACs required for that layer by 256MACs per cc. If it was 256 8x8, then I'd assume it's 256*8*8 = 16384 MACs/cc and the answer should be 13.5 which is rounded to 14 cycles. Where do I make mistake?
2. According to tensorflow naming the padding that makes 10x10x3 input into 8x8x128 input is 'valid' padding not same'.
Hi, for point 1). Each MAC is an 8-bit x 8-bit MAC and it's referring as 8 bits for IFM and weights. As answer says "Now say if your IFM is 16 bit then this means that we can do 128 16x8 multiplications per cc. which mean that now we need 1728 cc for these MAC operations." as you can see here the clock cycle number is getting half as you have a 16 bit IFM. for point 2) "Same pad" meaning here was we that no padding is changed. But theoratically yes, it's "valid pad".
you can always refer to https://developer.arm.com/documentation/102420/0200/Programmers-model/Register-page-BASE/Register-CONFIG?lang=en for more details on the MAC Unit and Configurations.
Ok - now I understand - the 8x8 part refers to the size in bits of things being computed. So it's actually simple :) Thanks for clarification.
Hi Cezary Bloch thanks for asking a question. If you feel that your question has been answered, you can mark the answer as an Accepted Answer. Go to Actions > Accept Answer. Many thanks.