Fix/fix convert float to fp16 warning#6525
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6525 +/- ##
==========================================
- Coverage 93.08% 92.94% -0.14%
==========================================
Files 808 809 +1
Lines 256136 257088 +952
==========================================
+ Hits 238416 238963 +547
- Misses 17720 18125 +405 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request aims to eliminate float-to-fp16 compilation warnings by adding explicit (__fp16) casts throughout RISC-V specific layer implementations. The changes target various operations including interpolation, convolution, deconvolution, instance normalization, and other neural network operations.
Changes:
- Added
(__fp16)casts to float literals and variables when passing them to fp16 intrinsics - Cast zero initializers for fp16 variables and vectors
- Cast alpha coefficients in interpolation operations
- Cast bias values and other scalar parameters in various operations
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| src/layer/riscv/interp_riscv_zfh.cpp | Added casts for alphap coefficients in bilinear and bicubic interpolation |
| src/layer/riscv/interp_bilinear_packn_fp16s.h | Partially added casts for alphap coefficients (incomplete) |
| src/layer/riscv/interp_bicubic_packn_fp16s.h | Partially added casts for alphap coefficients (incomplete) |
| src/layer/riscv/instancenorm_riscv_zfh.cpp | Added casts for zero initializers and epsilon values |
| src/layer/riscv/innerproduct_riscv_zfh.cpp | Added casts for zero initializers in vector operations |
| src/layer/riscv/gru_riscv_zfh.cpp | Refactored sigmoid computation casts |
| src/layer/riscv/deconvolution_*_fp16s.h | Added casts for zero initializers |
| src/layer/riscv/convolutiondepthwise_3x3.h | Incorrectly added casts for float bias variables |
| src/layer/riscv/convolution_winograd_*.h | Added casts for various coefficients and initializers |
| src/layer/riscv/convolution_sgemm*.h | Incorrectly added casts for float bias variables and arrays |
| src/layer/riscv/convolution_*_fp16s.h | Added casts for zero initializers and coefficients |
| src/layer/riscv/convolution1d_riscv_zfh.cpp | Added casts for val parameters in widen-multiply operations |
| src/layer/riscv/celu_riscv_zfh.cpp | Added casts for alpha and scalar constants |
| src/layer/riscv/bias_riscv_zfh.cpp | Added cast for bias data access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
Thanks for your contribution ! |
Fix: eliminate all float-to-fp16 compilation warnings