Xilinx / brevitas

Brevitas: neural network quantization in PyTorch
https://xilinx.github.io/brevitas/
Other
1.15k stars 191 forks source link

Caching of input/output data with QuantEltwiseAdd and QuantCat #260

Open volcacius opened 3 years ago

volcacius commented 3 years ago

Currently caching of input/output values for elementwise residual modules is broken. Reimplementing mixins are metaclasses should help, but a new mechanism for caching list of input quant tensors is probably gonna be necessary as with cat we don't know until runtime how many tensors are going to be there.

volcacius commented 3 years ago

It's easier to just pass the whole list of input/output tensors to cache together at once and cache them instead of looping over them. No need for metaclasses.