Skip to content

RVV1.0 Dequantize Layer#6658

Open
Deepdive543443 wants to merge 1 commit intoTencent:masterfrom
Deepdive543443:dequantize-riscv/PR
Open

RVV1.0 Dequantize Layer#6658
Deepdive543443 wants to merge 1 commit intoTencent:masterfrom
Deepdive543443:dequantize-riscv/PR

Conversation

@Deepdive543443
Copy link
Copy Markdown
Contributor

Road to int8 optimization Episode 2: Dequantize Layer

@github-actions github-actions Bot added the riscv label Apr 7, 2026
Comment thread src/layer/riscv/dequantize_riscv.cpp Outdated
{
vfloat32m2_t _s = __riscv_vle32_v_f32m2(scale_data, vlm2);
_scale = __riscv_vcreate_v_f32m2_f32m8(_s, _s, _s, _s);
}
Copy link
Copy Markdown
Contributor Author

@Deepdive543443 Deepdive543443 Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All "elempack == vlm2" checks are added to bypass the "FORCE_INPUT_PACK8" unit test. It seems work, but I wonder, in RVV, when we will have pack8 input for dequantize layer? Isn't Net Module always packing elements in single vector length?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All "elempack == vlm2" checks are added to bypass the "FORCE_INPUT_PACK8" unit test. It seems work, but I wonder, in RVV, when we will have pack8 input for dequantize layer? Isn't Net Module always packing elements in single vector length?

yes, always use the native packn. packn can be pack4 pack8 pack16 etc .

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 19, 2026

Codecov Report

❌ Patch coverage is 97.45223% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.96%. Comparing base (71b1a61) to head (ca3e8c2).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/layer/riscv/dequantize_riscv_zfh.cpp 96.20% 3 Missing ⚠️
src/layer/riscv/dequantize_riscv.cpp 98.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #6658    +/-   ##
========================================
  Coverage   93.96%   93.96%            
========================================
  Files         932      934     +2     
  Lines      299059   299395   +336     
========================================
+ Hits       280998   281321   +323     
- Misses      18061    18074    +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants