-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for non-zero padding #229
Comments
No plans to implement this in the next few months. But after the ASPLOS deadline (in October), I might have more bandwidth to add more features. Sorry about that! I'll keep this issue open till we implement this. |
Hi @hngenc , I ended up implementing it because I needed it for a use case, I will prepare the pull request so that we can review it together. |
That's wonderful; looking forward to it! |
Hi @hngenc , sorry for the delay, had a couple of deadlines I needed to achieve. I am now fully migrating what I did for the new Gemmini version, once I have everything working with the new version, I will let you know |
Sounds great; thank you! |
Hi all!
I was interested in knowing if you are planning on supporting non-zero padding for the LoopConv state machine.
Use case
TFLite models quantize the input of a layer with a scale and an offset. Because of this, in order for the layer's convolution to make sense mathematically, the padding zeros also need to be quantized with the same scale and offset. Because the offset is non-zero, the resulting padding value is also non-zero.
Current solution
Pad outside Gemmini, and then call tiled_conv_auto with padding = 0, with the new padded IN_DIM (this is the original IN_DIM plus the padding). This works fine mathematically, but is clearly slow.
Proposal
To add the padding value as an SInt(8.W) to the gemmini loop ws CISC instruction, and then modify the LoopConv to insert this padding accordingly.
The text was updated successfully, but these errors were encountered: