Skip to content

Conversation

@little-creator
Copy link

Title: Added RVV Support to cpu/kernels.cc

Description:

Added detection for the RVV environment in CMakeLists.txt when cpu_dispatch is enabled.

Added RVV support to cpu_info.cc, cpu_info.h, cpu_isa.cc, and cpu_isa.h.

Added RVV support to kernels.cc and resolved the issue where RVV variables could not be directly captured by lambda expressions.

Added the vec_rvv.h file, with some basic functions now using RVV intrinsics.

Performance Test:
Based on actual hardware performance tests, the benchmark_ops file was used with additional test cases. The new test cases are executed 10,000 times per run.

Operator Type General Average Runtime(ms) RVV Average Runtime(ms)
gather 0.154628 0.144186
transpose 5.303657 5.357578
split 0.120388 0.108563
layer_norm 0.166369 0.074182
softmax 0.881063 1.019465
topk 2.887905 2.718763
dequantize 0.912389 0.325955
add 0.000267 0.000177
add_scalar 0.000236 0.000170
mul 0.000253 0.000178
mul_scalar 0.000263 0.000157
sub 0.000233 0.000172
add_large 0.001585 0.001213
add_scalar_large 0.001366 0.000979
mul_large 0.001586 0.001160
mul_scalar_large 0.001388 0.000995
sub_large 0.001590 0.001163

Signed-off-by: lyd1992 <liuyudong@iscas.ac.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant