
where \(\text{$N_c$}\)  is the number of MAC operations, \(\text{$N_s$}\)  is the number of weights, and \(\text{$O_s$}\)  is the number of intermediate outputs throughout the network. For \(E_{\text{C}}\) , in a QNN, batch normalization, activation function, gradient calculation, and weight update are done in full-precision \(n_{\text{max}}\)  to each output \(\text{$O_s$}\)  [1]}. Once we fetch weights from a main to a local buffer, they can be reused in the local buffer afterward as shown in \(E_\text{W}(n)\) . In Fig. REF , a MAC unit fetches weights from a local buffer for computation. Since we are using a two dimensional MAC array of \(p\)  MAC units, they can share fetched weights with the same row and column, which has \(\sqrt{p}\)  MAC units respectively. In addition, a MAC unit can fetch more weights due to the quantization with \(n\)  bits compared with when weights are represented in \(n_{\text{max}}\)  bits. Thus, we can reduce the access to a local buffer by the amount of \(\sqrt{{n}/{pn_{\text{max}}}}\) . A similar process applies to \(E_\text{A}\)  since activations are fetched (stored) from (to) the main buffer.
