riscv64: wire TRSM, complex SYMV, and complex GEMM copy RVV kernels#5807
riscv64: wire TRSM, complex SYMV, and complex GEMM copy RVV kernels#5807mengzhuo wants to merge 1 commit into
Conversation
Wire existing RVV-optimized kernels into KERNEL.RISCV64_ZVL128B and KERNEL.RISCV64_ZVL256B that were already implemented but not referenced: - TRSM (S/D/C/Z, all 4 directions): replace ../generic/trsm_kernel_*.c with trsm_kernel_*_rvv_v1.c - TRSM copy: add TRSMCOPY*_M and ZTRSMCOPY*_M variables using trsm_*copy_rvv_v1.c and ztrsm_*copy_rvv_v1.c - Complex SYMV (C/Z): replace ../generic/zsymv_k.c with zsymv_*_rvv.c - HEMV (C/Z): replace zhemv_*_vector.c with zhemv_*_rvv.c - Complex GEMM copy (C/Z): replace ../generic/zgemm_ncopy/tcopy with zgemm_ncopy_rvv_v1.c / zgemm_tcopy_rvv_v1.c Generic fallback counts: ZVL256B 56->28, ZVL128B 63->47
Merging this PR will improve performance by 17.64%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_daxpy[100-c] |
25.3 µs | 21.6 µs | +17.2% |
| ⚡ | test_daxpy[100-d] |
24.3 µs | 20.6 µs | +18.15% |
| ⚡ | test_nrm2[100-d] |
37.7 µs | 25.8 µs | +46.39% |
| ⚡ | test_daxpy[100-s] |
24.2 µs | 20.4 µs | +18.58% |
| ⚡ | test_nrm2[100-dz] |
28.9 µs | 25.3 µs | +14.22% |
| ⚡ | test_nrm2[1000-d] |
30.6 µs | 26.8 µs | +14.07% |
| ⚡ | test_daxpy[100-z] |
26 µs | 22.3 µs | +16.8% |
| ⚡ | test_nrm2[1000-dz] |
35.5 µs | 31.9 µs | +11.41% |
| ⚡ | test_daxpy[1000-c] |
32.9 µs | 29.2 µs | +12.75% |
| ⚡ | test_daxpy[1000-d] |
32.6 µs | 28.4 µs | +15.06% |
| ⚡ | test_daxpy[1000-s] |
27.7 µs | 24 µs | +15.52% |
| ⚡ | test_daxpy[1000-z] |
40.7 µs | 37 µs | +10.19% |
| ⚡ | test_dot[1000] |
28.4 µs | 24.5 µs | +15.99% |
| ⚡ | test_dot[100] |
22.5 µs | 18 µs | +24.57% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mengzhuo:no_gen (7ad237f) with develop (3da0ff7)
|
Sorry, no - you cannot just wire up GEMM copy functions from a different target without regard for the blocking parameters as defined in param.h that the respective GEMM kernels use. Likewise, TRSM depends in part on the GEMM kernel so needs to be matched to it. |
Wire existing RVV-optimized kernels into KERNEL.RISCV64_ZVL128B and KERNEL.RISCV64_ZVL256B that were already implemented but not referenced:
Generic fallback counts: ZVL256B 56->28, ZVL128B 63->47