ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

[WIP] rvv intrinsic 1.0+

Open nihui opened this issue 1 year ago • 2 comments
trafficstars

  • [x] port segment load store
  • [x] port zvfh
  • [x] android riscv64 ci
  • [ ] dispatch for rvv / xtheadvector / zvfh
  • [ ] update linux riscv toolchain

depends on https://github.com/ruyisdk/llvm-project/issues/127 https://github.com/ruyisdk/llvm-project/issues/128 https://github.com/ruyisdk/llvm-project/issues/131 https://github.com/ruyisdk/llvm-project/issues/132

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116590 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116591 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116592 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116593

tracking bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116594

nihui avatar Aug 21 '24 09:08 nihui

Codecov Report

Attention: Patch coverage is 99.38999% with 29 lines in your changes missing coverage. Please review.

Project coverage is 91.89%. Comparing base (0611ca7) to head (11b1e86). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/layer/riscv/convolutiondepthwise_riscv_zfh.cpp 97.72% 6 Missing :warning:
...c/layer/riscv/deconvolutiondepthwise_riscv_zfh.cpp 97.72% 6 Missing :warning:
src/cpu.cpp 50.00% 4 Missing :warning:
src/layer/riscv/convolution1d_riscv_zfh.cpp 98.26% 4 Missing :warning:
src/layer/riscv/convolution_riscv_zfh.cpp 97.72% 4 Missing :warning:
src/layer/riscv/deconvolution_riscv_zfh.cpp 95.83% 4 Missing :warning:
src/layer/riscv/binaryop_riscv_zfh.cpp 99.65% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5642      +/-   ##
==========================================
+ Coverage   89.99%   91.89%   +1.89%     
==========================================
  Files         267      386     +119     
  Lines       79032   100433   +21401     
==========================================
+ Hits        71122    92289   +21167     
- Misses       7910     8144     +234     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 21 '24 10:08 codecov-commenter

Removing support to xtheadvector might speed up this PR? xtheadvector is well-known for its ghost write bug, and community already has K1 as the alternative to RVV 1.0, maybe there is no real need for xtheadvector, we can just let it go :)

sequencer avatar Oct 13 '24 04:10 sequencer

binutils patch for linking rvv and xtheadvector objects together into single binary https://gist.github.com/nihui/91426bd047ba5542d3f2016cda84a0af

nihui avatar Nov 30 '24 06:11 nihui

https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1732863205852/Xuantie-900-gcc-linux-6.6.0-glibc-x86_64-V3.0.1-20241120.tar.gz https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1732866280418/ReleaseNote.pdf

nihui avatar Nov 30 '24 13:11 nihui

append compile flags -mno-riscv-attribute -Wa,-mno-arch-attr to gcc and it works https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html#index-mriscv-attribute https://gcc.gnu.org/onlinedocs/gcc/Assembler-Options.html https://man7.org/linux/man-pages/man1/as.1.html

nihui avatar Dec 01 '24 07:12 nihui

https://github.com/XUANTIE-RV/xuantie-gnu-toolchain/issues/21

nihui avatar Dec 03 '24 09:12 nihui