From 74921eee924625426429044decefe3673561b174 Mon Sep 17 00:00:00 2001 From: Michael Tyler Date: Wed, 12 Apr 2023 17:43:17 +0100 Subject: Update CPU kernel implementations and guard directives Resolves COMPMID-6023 Change-Id: I868975d14c4f98af6716726feda22405a6a4c891 Signed-off-by: Michael Tyler Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9686 Tested-by: Arm Jenkins Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- .../sve_interleaved_u8u32_dot_8x3VL/generic.cpp | 120 +++++++++++---------- 1 file changed, 62 insertions(+), 58 deletions(-) (limited to 'src/core/NEON/kernels/arm_gemm/kernels/sve_interleaved_u8u32_dot_8x3VL/generic.cpp') diff --git a/src/core/NEON/kernels/arm_gemm/kernels/sve_interleaved_u8u32_dot_8x3VL/generic.cpp b/src/core/NEON/kernels/arm_gemm/kernels/sve_interleaved_u8u32_dot_8x3VL/generic.cpp index 99fff4e83d..1c88336c2d 100644 --- a/src/core/NEON/kernels/arm_gemm/kernels/sve_interleaved_u8u32_dot_8x3VL/generic.cpp +++ b/src/core/NEON/kernels/arm_gemm/kernels/sve_interleaved_u8u32_dot_8x3VL/generic.cpp @@ -29,8 +29,12 @@ namespace arm_gemm { void sve_interleaved_u8u32_dot_8x3VL( - const uint8_t *Apanel, const uint8_t *Bpanel, - uint32_t *Cpanel, int ablocks, int bblocks, int K) { + const uint8_t *Apanel, + const uint8_t *Bpanel, + uint32_t *Cpanel, + int ablocks, + int bblocks, + int K) { struct KernelArgs { size_t K = {}; @@ -85,10 +89,10 @@ void sve_interleaved_u8u32_dot_8x3VL( "3:" // main loop head "udot z8.s, z4.b, z0.b[0]\n" "udot z11.s, z4.b, z0.b[1]\n" - "ld1rqb { z2.b }, p0/Z, [%x[Apanel], #32]\n" + "ld1rqb { z3.b }, p0/Z, [%x[Apanel], #32]\n" "udot z14.s, z4.b, z0.b[2]\n" "udot z17.s, z4.b, z0.b[3]\n" - "ld1rqb { z3.b }, p0/Z, [%x[Apanel], #48]\n" + "ld1rqb { z7.b }, p0/Z, [%x[Apanel], #48]\n" "udot z20.s, z4.b, z1.b[0]\n" "udot z23.s, z4.b, z1.b[1]\n" "sub x20, x20, #0x2\n" @@ -115,35 +119,35 @@ void sve_interleaved_u8u32_dot_8x3VL( "udot z25.s, z6.b, z1.b[1]\n" "udot z28.s, z6.b, z1.b[2]\n" "udot z31.s, z6.b, z1.b[3]\n" - "ld1b { z6.b }, p0/Z, [x22, #5, MUL VL]\n" + "ld1b { z2.b }, p0/Z, [x22, #5, MUL VL]\n" "addvl x22, x22, #6\n" - "udot z8.s, z4.b, z2.b[0]\n" - "udot z11.s, z4.b, z2.b[1]\n" + "udot z8.s, z4.b, z3.b[0]\n" + "udot z11.s, z4.b, z3.b[1]\n" "ld1rqb { z1.b }, p0/Z, [%x[Apanel], #16]\n" - "udot z14.s, z4.b, z2.b[2]\n" - "udot z17.s, z4.b, z2.b[3]\n" - "udot z20.s, z4.b, z3.b[0]\n" - "udot z23.s, z4.b, z3.b[1]\n" - "udot z26.s, z4.b, z3.b[2]\n" - "udot z29.s, z4.b, z3.b[3]\n" + "udot z14.s, z4.b, z3.b[2]\n" + "udot z17.s, z4.b, z3.b[3]\n" + "udot z20.s, z4.b, z7.b[0]\n" + "udot z23.s, z4.b, z7.b[1]\n" + "udot z26.s, z4.b, z7.b[2]\n" + "udot z29.s, z4.b, z7.b[3]\n" "ld1b { z4.b }, p0/Z, [x22]\n" - "udot z9.s, z5.b, z2.b[0]\n" - "udot z12.s, z5.b, z2.b[1]\n" - "udot z15.s, z5.b, z2.b[2]\n" - "udot z18.s, z5.b, z2.b[3]\n" - "udot z21.s, z5.b, z3.b[0]\n" - "udot z24.s, z5.b, z3.b[1]\n" - "udot z27.s, z5.b, z3.b[2]\n" - "udot z30.s, z5.b, z3.b[3]\n" + "udot z9.s, z5.b, z3.b[0]\n" + "udot z12.s, z5.b, z3.b[1]\n" + "udot z15.s, z5.b, z3.b[2]\n" + "udot z18.s, z5.b, z3.b[3]\n" + "udot z21.s, z5.b, z7.b[0]\n" + "udot z24.s, z5.b, z7.b[1]\n" + "udot z27.s, z5.b, z7.b[2]\n" + "udot z30.s, z5.b, z7.b[3]\n" "ld1b { z5.b }, p0/Z, [x22, #1, MUL VL]\n" - "udot z10.s, z6.b, z2.b[0]\n" - "udot z13.s, z6.b, z2.b[1]\n" - "udot z16.s, z6.b, z2.b[2]\n" - "udot z19.s, z6.b, z2.b[3]\n" - "udot z22.s, z6.b, z3.b[0]\n" - "udot z25.s, z6.b, z3.b[1]\n" - "udot z28.s, z6.b, z3.b[2]\n" - "udot z31.s, z6.b, z3.b[3]\n" + "udot z10.s, z2.b, z3.b[0]\n" + "udot z13.s, z2.b, z3.b[1]\n" + "udot z16.s, z2.b, z3.b[2]\n" + "udot z19.s, z2.b, z3.b[3]\n" + "udot z22.s, z2.b, z7.b[0]\n" + "udot z25.s, z2.b, z7.b[1]\n" + "udot z28.s, z2.b, z7.b[2]\n" + "udot z31.s, z2.b, z7.b[3]\n" "ld1b { z6.b }, p0/Z, [x22, #2, MUL VL]\n" "bge 3b\n" "4:" // main loop skip @@ -174,37 +178,37 @@ void sve_interleaved_u8u32_dot_8x3VL( "udot z28.s, z6.b, z1.b[2]\n" "udot z31.s, z6.b, z1.b[3]\n" "cbz x20, 5f\n" - "ld1rqb { z0.b }, p0/Z, [%x[Apanel]]\n" - "ld1rqb { z1.b }, p0/Z, [%x[Apanel], #16]\n" + "ld1rqb { z4.b }, p0/Z, [%x[Apanel]]\n" + "ld1rqb { z3.b }, p0/Z, [%x[Apanel], #16]\n" "add %x[Apanel], %x[Apanel], #0x20\n" - "ld1b { z7.b }, p0/Z, [x22]\n" - "ld1b { z4.b }, p0/Z, [x22, #1, MUL VL]\n" - "udot z8.s, z7.b, z0.b[0]\n" - "ld1b { z5.b }, p0/Z, [x22, #2, MUL VL]\n" - "udot z11.s, z7.b, z0.b[1]\n" - "udot z14.s, z7.b, z0.b[2]\n" - "udot z17.s, z7.b, z0.b[3]\n" - "udot z20.s, z7.b, z1.b[0]\n" + "ld1b { z2.b }, p0/Z, [x22]\n" + "ld1b { z1.b }, p0/Z, [x22, #1, MUL VL]\n" + "udot z8.s, z2.b, z4.b[0]\n" + "ld1b { z0.b }, p0/Z, [x22, #2, MUL VL]\n" + "udot z11.s, z2.b, z4.b[1]\n" + "udot z14.s, z2.b, z4.b[2]\n" + "udot z17.s, z2.b, z4.b[3]\n" + "udot z20.s, z2.b, z3.b[0]\n" "addvl x22, x22, #3\n" - "udot z23.s, z7.b, z1.b[1]\n" - "udot z26.s, z7.b, z1.b[2]\n" - "udot z29.s, z7.b, z1.b[3]\n" - "udot z9.s, z4.b, z0.b[0]\n" - "udot z12.s, z4.b, z0.b[1]\n" - "udot z15.s, z4.b, z0.b[2]\n" - "udot z18.s, z4.b, z0.b[3]\n" - "udot z21.s, z4.b, z1.b[0]\n" - "udot z24.s, z4.b, z1.b[1]\n" - "udot z27.s, z4.b, z1.b[2]\n" - "udot z30.s, z4.b, z1.b[3]\n" - "udot z10.s, z5.b, z0.b[0]\n" - "udot z13.s, z5.b, z0.b[1]\n" - "udot z16.s, z5.b, z0.b[2]\n" - "udot z19.s, z5.b, z0.b[3]\n" - "udot z22.s, z5.b, z1.b[0]\n" - "udot z25.s, z5.b, z1.b[1]\n" - "udot z28.s, z5.b, z1.b[2]\n" - "udot z31.s, z5.b, z1.b[3]\n" + "udot z23.s, z2.b, z3.b[1]\n" + "udot z26.s, z2.b, z3.b[2]\n" + "udot z29.s, z2.b, z3.b[3]\n" + "udot z9.s, z1.b, z4.b[0]\n" + "udot z12.s, z1.b, z4.b[1]\n" + "udot z15.s, z1.b, z4.b[2]\n" + "udot z18.s, z1.b, z4.b[3]\n" + "udot z21.s, z1.b, z3.b[0]\n" + "udot z24.s, z1.b, z3.b[1]\n" + "udot z27.s, z1.b, z3.b[2]\n" + "udot z30.s, z1.b, z3.b[3]\n" + "udot z10.s, z0.b, z4.b[0]\n" + "udot z13.s, z0.b, z4.b[1]\n" + "udot z16.s, z0.b, z4.b[2]\n" + "udot z19.s, z0.b, z4.b[3]\n" + "udot z22.s, z0.b, z3.b[0]\n" + "udot z25.s, z0.b, z3.b[1]\n" + "udot z28.s, z0.b, z3.b[2]\n" + "udot z31.s, z0.b, z3.b[3]\n" "5:" // multiply loop done "st1w { z8.s }, p0, [%x[Cpanel]]\n" "subs x23, x23, #0x1\n" -- cgit v1.2.1