RVV1.0 Requantize Layer#6695
Conversation
|
|
|
@codex review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6695 +/- ##
==========================================
- Coverage 95.85% 95.46% -0.39%
==========================================
Files 934 935 +1
Lines 312692 312277 -415
==========================================
- Hits 299720 298122 -1598
- Misses 12972 14155 +1183 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a RISC-V (RVV 1.0) implementation of the Requantize layer (third installment in the int8 optimization series), along with helper SIMD routines and updated tests for the new backend.
Changes:
- Adds
Requantize_riscv(header + cpp) implementing vectorized requantize + bias + activation + int8 conversion using RVV intrinsics, plus a scalar fallback. - Adds RVV helpers
float2int8reluandfloat2int8leakyrelu(m4/m8 variants) toriscv_usability.h. - In
tests/test_requantize.cpp, adds a newtest_requantizehelper (no forced pack8) and routestest_requantize_3through it on__riscvbuilds instead oftest_requantize_pack8.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/layer/riscv/requantize_riscv.h | Declares Requantize_riscv derived from base Requantize. |
| src/layer/riscv/requantize_riscv.cpp | Vectorized requantize implementation with separate ReLU/LeakyReLU fast path and generic activation path; dim 1/2/3 forward. |
| src/layer/riscv/riscv_usability.h | New float2int8relu and float2int8leakyrelu RVV helpers used by the new layer. |
| tests/test_requantize.cpp | Adds a non-pack-forcing helper used in test_requantize_3 for __riscv to replace the pack8 cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e865d60338
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d57defc to
5ec204c
Compare
|
Thanks for your contribution ! |
Road to int8 optimization Episode 3: Requantize Layer