From 5a6773343f81cec47baa80dcac13bf72168bd987 Mon Sep 17 00:00:00 2001 From: David Mansell Date: Thu, 14 Mar 2024 18:44:16 +0000 Subject: arm_gemm: Fix bias handling for sme2 FP16 GEMV. Resolves: COMPMID-6927 Signed-off-by: David Mansell Change-Id: Ib426fdc11ddbdbd0028d64547f3eaf312ca5fcce Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11301 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir --- .../sme2_gemv_fp16fp32fp16_dot_16VL/generic.cpp | 530 ++++++++++++--------- 1 file changed, 302 insertions(+), 228 deletions(-) (limited to 'src/core/NEON/kernels') diff --git a/src/core/NEON/kernels/arm_gemm/kernels/sme2_gemv_fp16fp32fp16_dot_16VL/generic.cpp b/src/core/NEON/kernels/arm_gemm/kernels/sme2_gemv_fp16fp32fp16_dot_16VL/generic.cpp index 1067a8548a..97c2427617 100644 --- a/src/core/NEON/kernels/arm_gemm/kernels/sme2_gemv_fp16fp32fp16_dot_16VL/generic.cpp +++ b/src/core/NEON/kernels/arm_gemm/kernels/sme2_gemv_fp16fp32fp16_dot_16VL/generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Arm Limited. + * Copyright (c) 2023-2024 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -105,10 +105,18 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "mov x20, %x[N]\n" "mov x22, %x[K]\n" ".inst 0xf8b54af8 // rprfm pldmany, x21, [x23]\n" - ".inst 0x257467f0 // whilelt p8.h, XZR, x20, VLx4\n" + ".inst 0x257447f0 // whilelt p8.h, XZR, x20, VLx2\n" "cbz x24, 5f\n" - ".inst 0xa040c700 // ld1w { z0.s-z3.s }, pn9.b/Z, [x24]\n" - ".inst 0xc0042c00 // mova za.d[x9, #0], { z0.d-z3.d }\n" + "ld1h { z20.s }, p1/Z, [x24]\n" + "addvl x20, x24, #4\n" + "ld1h { z21.s }, p1/Z, [x24, #1, MUL VL]\n" + "ld1h { z22.s }, p1/Z, [x24, #2, MUL VL]\n" + "ld1h { z23.s }, p1/Z, [x24, #3, MUL VL]\n" + "fcvt z20.s, p1/m, z20.h\n" + "fcvt z21.s, p1/m, z21.h\n" + "fcvt z22.s, p1/m, z22.h\n" + "fcvt z23.s, p1/m, z23.h\n" + ".inst 0xc0042e80 // mova za.d[x9, #0], { z20.d-z23.d }\n" "b 6f\n" "5:" // Width 1: no bias ".inst 0xc00800ff // zero { zad0, zad1, zad2, zad3, zad4, zad5, zad6, zad7 }\n" @@ -117,63 +125,63 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "ble 8f\n" "7:" // Width 1: Multiply loop: Main loop head "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" "addvl x27, x27, #16\n" - "ld1rqh { z14.h }, p0/Z, [x23]\n" + "ld1rqh { z0.h }, p0/Z, [x23]\n" "sub x22, x22, #0x8\n" "add x23, x23, #0x10\n" - ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" "addvl x27, x27, #16\n" "cmp x22, #0x8\n" - ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" "addvl x27, x27, #16\n" - ".inst 0xc15eb308 // fdot za.s[x9, 0], { z24.h-z27.h }, z14.h[0]\n" - ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" + ".inst 0xc150b208 // fdot za.s[x9, 0], { z16.h-z19.h }, z0.h[0]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" "addvl x27, x27, #16\n" - ".inst 0xc15eb608 // fdot za.s[x9, 0], { z16.h-z19.h }, z14.h[1]\n" - ".inst 0xc15eb808 // fdot za.s[x9, 0], { z0.h-z3.h }, z14.h[2]\n" - ".inst 0xc15ebf88 // fdot za.s[x9, 0], { z28.h-z31.h }, z14.h[3]\n" + ".inst 0xc150b788 // fdot za.s[x9, 0], { z28.h-z31.h }, z0.h[1]\n" + ".inst 0xc150bb08 // fdot za.s[x9, 0], { z24.h-z27.h }, z0.h[2]\n" + ".inst 0xc150bc88 // fdot za.s[x9, 0], { z4.h-z7.h }, z0.h[3]\n" "bgt 7b\n" "8:" // Width 1: Multiply loop: Single iteration only "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z11.h }, p0/Z, [x23]\n" "add x23, x23, #0x10\n" "addvl x27, x27, #16\n" - ".inst 0xc157b388 // fdot za.s[x9, 0], { z28.h-z31.h }, z7.h[0]\n" + ".inst 0xc15bb308 // fdot za.s[x9, 0], { z24.h-z27.h }, z11.h[0]\n" "ble 9f\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" "addvl x27, x27, #16\n" - ".inst 0xc157b508 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[1]\n" + ".inst 0xc15bb708 // fdot za.s[x9, 0], { z24.h-z27.h }, z11.h[1]\n" "ble 9f\n" - ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" "addvl x27, x27, #16\n" - ".inst 0xc157b988 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[2]\n" + ".inst 0xc15bbb08 // fdot za.s[x9, 0], { z24.h-z27.h }, z11.h[2]\n" "ble 9f\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bd08 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[3]\n" + ".inst 0xc15bbf88 // fdot za.s[x9, 0], { z28.h-z31.h }, z11.h[3]\n" "9:" // Width 1: Multiply loop: multiply skip "tbz %x[flags], #1, 10f\n" ".inst 0xc0062c10 // mova { z16.d-z19.d }, za.d[x9, #0]\n" "add x21, %x[args_ptr], %[offset_min]\n" "add x20, %x[args_ptr], %[offset_max]\n" - "ld1rh { z2.h }, p1/Z, [x21]\n" - "ld1rh { z1.h }, p1/Z, [x20]\n" - ".inst 0xc120e210 // fcvt z16.h, { z16.s-z17.s }\n" - ".inst 0xc120e251 // fcvt z17.h, { z18.s-z19.s }\n" - ".inst 0xc161c050 // fclamp { z16.h-z17.h }, z2.h, z1.h\n" - ".inst 0xa0602330 // st1h { z16.h-z17.h }, p8, [x25]\n" + "ld1rh { z29.h }, p1/Z, [x21]\n" + "ld1rh { z20.h }, p1/Z, [x20]\n" + ".inst 0xc120e204 // fcvt z4.h, { z16.s-z17.s }\n" + ".inst 0xc120e245 // fcvt z5.h, { z18.s-z19.s }\n" + ".inst 0xc174c3a4 // fclamp { z4.h-z5.h }, z29.h, z20.h\n" + ".inst 0xa0602324 // st1h { z4.h-z5.h }, p8, [x25]\n" "addvl x25, x25, #2\n" "b 11f\n" "10:" // Width 1: No activation - ".inst 0xc0062c04 // mova { z4.d-z7.d }, za.d[x9, #0]\n" - ".inst 0xc120e09e // fcvt z30.h, { z4.s-z5.s }\n" - ".inst 0xc120e0df // fcvt z31.h, { z6.s-z7.s }\n" - ".inst 0xa060233e // st1h { z30.h-z31.h }, p8, [x25]\n" + ".inst 0xc0062c00 // mova { z0.d-z3.d }, za.d[x9, #0]\n" + ".inst 0xc120e012 // fcvt z18.h, { z0.s-z1.s }\n" + ".inst 0xc120e05a // fcvt z26.h, { z2.s-z3.s }\n" + ".inst 0xa1602332 // st1h { z18.h, z26.h }, p8, [x25]\n" "addvl x25, x25, #2\n" "11:" // Width 1: Output done "b 36f\n" @@ -183,12 +191,27 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "sub x20, %x[N], x28\n" "mov x22, %x[K]\n" ".inst 0xf8b54af8 // rprfm pldmany, x21, [x23]\n" - ".inst 0x257467f0 // whilelt p8.h, XZR, x20, VLx4\n" + ".inst 0x257447f0 // whilelt p8.h, XZR, x20, VLx2\n" "cbz x24, 13f\n" - ".inst 0xa040c71c // ld1w { z28.s-z31.s }, pn9.b/Z, [x24]\n" - ".inst 0xa041c700 // ld1w { z0.s-z3.s }, pn9.b/Z, [x24, #0x4, MUL VL]\n" - ".inst 0xc0042f80 // mova za.d[x9, #0], { z28.d-z31.d }\n" - ".inst 0xc0042c01 // mova za.d[x9, #1], { z0.d-z3.d }\n" + "ld1h { z12.s }, p1/Z, [x24]\n" + "addvl x20, x24, #4\n" + "ld1h { z13.s }, p1/Z, [x24, #1, MUL VL]\n" + "ld1h { z14.s }, p1/Z, [x24, #2, MUL VL]\n" + "ld1h { z15.s }, p1/Z, [x24, #3, MUL VL]\n" + "fcvt z12.s, p1/m, z12.h\n" + "ld1h { z28.s }, p1/Z, [x24, #4, MUL VL]\n" + "fcvt z13.s, p1/m, z13.h\n" + "ld1h { z29.s }, p1/Z, [x24, #5, MUL VL]\n" + "fcvt z14.s, p1/m, z14.h\n" + "ld1h { z30.s }, p1/Z, [x24, #6, MUL VL]\n" + "fcvt z15.s, p1/m, z15.h\n" + "ld1h { z31.s }, p1/Z, [x24, #7, MUL VL]\n" + "fcvt z28.s, p1/m, z28.h\n" + "fcvt z29.s, p1/m, z29.h\n" + "fcvt z30.s, p1/m, z30.h\n" + "fcvt z31.s, p1/m, z31.h\n" + ".inst 0xc0042d80 // mova za.d[x9, #0], { z12.d-z15.d }\n" + ".inst 0xc0042f81 // mova za.d[x9, #1], { z28.d-z31.d }\n" "b 14f\n" "13:" // Width 2: no bias ".inst 0xc00800ff // zero { zad0, zad1, zad2, zad3, zad4, zad5, zad6, zad7 }\n" @@ -197,88 +220,88 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "ble 16f\n" "15:" // Width 2: Multiply loop: Main loop head "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" "sub x22, x22, #0x8\n" - "ld1rqh { z1.h }, p0/Z, [x23]\n" + "ld1rqh { z8.h }, p0/Z, [x23]\n" "cmp x22, #0x8\n" "add x23, x23, #0x10\n" - ".inst 0xa041a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" - ".inst 0xc151b308 // fdot za.s[x9, 0], { z24.h-z27.h }, z1.h[0]\n" + ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" + ".inst 0xc158b088 // fdot za.s[x9, 0], { z4.h-z7.h }, z8.h[0]\n" ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc151b289 // fdot za.s[x9, 1], { z20.h-z23.h }, z1.h[0]\n" - ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" - ".inst 0xa041a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc158b009 // fdot za.s[x9, 1], { z0.h-z3.h }, z8.h[0]\n" + ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" + ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc151b488 // fdot za.s[x9, 0], { z4.h-z7.h }, z1.h[1]\n" ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" - ".inst 0xc151b589 // fdot za.s[x9, 1], { z12.h-z15.h }, z1.h[1]\n" - ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc158b608 // fdot za.s[x9, 0], { z16.h-z19.h }, z8.h[1]\n" + ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc151bb88 // fdot za.s[x9, 0], { z28.h-z31.h }, z1.h[2]\n" - ".inst 0xc151b909 // fdot za.s[x9, 1], { z8.h-z11.h }, z1.h[2]\n" - ".inst 0xc151bc88 // fdot za.s[x9, 0], { z4.h-z7.h }, z1.h[3]\n" - ".inst 0xc151bd89 // fdot za.s[x9, 1], { z12.h-z15.h }, z1.h[3]\n" + ".inst 0xc158b589 // fdot za.s[x9, 1], { z12.h-z15.h }, z8.h[1]\n" + ".inst 0xc158bb08 // fdot za.s[x9, 0], { z24.h-z27.h }, z8.h[2]\n" + ".inst 0xc158b809 // fdot za.s[x9, 1], { z0.h-z3.h }, z8.h[2]\n" + ".inst 0xc158bc88 // fdot za.s[x9, 0], { z4.h-z7.h }, z8.h[3]\n" + ".inst 0xc158bf89 // fdot za.s[x9, 1], { z28.h-z31.h }, z8.h[3]\n" "bgt 15b\n" "16:" // Width 2: Multiply loop: Single iteration only "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z11.h }, p0/Z, [x23]\n" "add x23, x23, #0x10\n" - ".inst 0xa041a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b108 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[0]\n" - ".inst 0xc157b309 // fdot za.s[x9, 1], { z24.h-z27.h }, z7.h[0]\n" + ".inst 0xc15bb088 // fdot za.s[x9, 0], { z4.h-z7.h }, z11.h[0]\n" + ".inst 0xc15bb189 // fdot za.s[x9, 1], { z12.h-z15.h }, z11.h[0]\n" "ble 17f\n" - ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" ".inst 0xa041a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b708 // fdot za.s[x9, 0], { z24.h-z27.h }, z7.h[1]\n" - ".inst 0xc157b689 // fdot za.s[x9, 1], { z20.h-z23.h }, z7.h[1]\n" + ".inst 0xc15bb608 // fdot za.s[x9, 0], { z16.h-z19.h }, z11.h[1]\n" + ".inst 0xc15bb689 // fdot za.s[x9, 1], { z20.h-z23.h }, z11.h[1]\n" "ble 17f\n" - ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa041a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b808 // fdot za.s[x9, 0], { z0.h-z3.h }, z7.h[2]\n" - ".inst 0xc157ba09 // fdot za.s[x9, 1], { z16.h-z19.h }, z7.h[2]\n" + ".inst 0xc15bb988 // fdot za.s[x9, 0], { z12.h-z15.h }, z11.h[2]\n" + ".inst 0xc15bba89 // fdot za.s[x9, 1], { z20.h-z23.h }, z11.h[2]\n" "ble 17f\n" - ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" - ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" + ".inst 0xa041a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bd88 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[3]\n" - ".inst 0xc157bf89 // fdot za.s[x9, 1], { z28.h-z31.h }, z7.h[3]\n" + ".inst 0xc15bbc08 // fdot za.s[x9, 0], { z0.h-z3.h }, z11.h[3]\n" + ".inst 0xc15bbf09 // fdot za.s[x9, 1], { z24.h-z27.h }, z11.h[3]\n" "17:" // Width 2: Multiply loop: multiply skip "tbz %x[flags], #1, 18f\n" - ".inst 0xc0062c1c // mova { z28.d-z31.d }, za.d[x9, #0]\n" + ".inst 0xc0062c0c // mova { z12.d-z15.d }, za.d[x9, #0]\n" "add x21, %x[args_ptr], %[offset_min]\n" "add x20, %x[args_ptr], %[offset_max]\n" - ".inst 0xc0062c30 // mova { z16.d-z19.d }, za.d[x9, #1]\n" - "ld1rh { z13.h }, p1/Z, [x21]\n" - "ld1rh { z0.h }, p1/Z, [x20]\n" - ".inst 0xc120e38e // fcvt z14.h, { z28.s-z29.s }\n" - ".inst 0xc120e3cf // fcvt z15.h, { z30.s-z31.s }\n" - ".inst 0xc120e218 // fcvt z24.h, { z16.s-z17.s }\n" - ".inst 0xc120e259 // fcvt z25.h, { z18.s-z19.s }\n" - ".inst 0xc160c1ae // fclamp { z14.h-z15.h }, z13.h, z0.h\n" - ".inst 0xc160c1b8 // fclamp { z24.h-z25.h }, z13.h, z0.h\n" - ".inst 0xa060272e // st1h { z14.h-z15.h }, pn9.b, [x25]\n" - ".inst 0xa0612338 // st1h { z24.h-z25.h }, p8, [x25, #0x2, MUL VL]\n" + ".inst 0xc0062c3c // mova { z28.d-z31.d }, za.d[x9, #1]\n" + "ld1rh { z5.h }, p1/Z, [x21]\n" + "ld1rh { z21.h }, p1/Z, [x20]\n" + ".inst 0xc120e188 // fcvt z8.h, { z12.s-z13.s }\n" + ".inst 0xc120e1c9 // fcvt z9.h, { z14.s-z15.s }\n" + ".inst 0xc120e39c // fcvt z28.h, { z28.s-z29.s }\n" + ".inst 0xc120e3dd // fcvt z29.h, { z30.s-z31.s }\n" + ".inst 0xc175c0a8 // fclamp { z8.h-z9.h }, z5.h, z21.h\n" + ".inst 0xc175c0bc // fclamp { z28.h-z29.h }, z5.h, z21.h\n" + ".inst 0xa0602728 // st1h { z8.h-z9.h }, pn9.b, [x25]\n" + ".inst 0xa061233c // st1h { z28.h-z29.h }, p8, [x25, #0x2, MUL VL]\n" "addvl x25, x25, #4\n" "b 19f\n" "18:" // Width 2: No activation - ".inst 0xc0062c10 // mova { z16.d-z19.d }, za.d[x9, #0]\n" - ".inst 0xc0062c38 // mova { z24.d-z27.d }, za.d[x9, #1]\n" - ".inst 0xc120e205 // fcvt z5.h, { z16.s-z17.s }\n" - ".inst 0xc120e24d // fcvt z13.h, { z18.s-z19.s }\n" - ".inst 0xa1602725 // st1h { z5.h, z13.h }, pn9.b, [x25]\n" - ".inst 0xc120e316 // fcvt z22.h, { z24.s-z25.s }\n" - ".inst 0xc120e35e // fcvt z30.h, { z26.s-z27.s }\n" - ".inst 0xa1612336 // st1h { z22.h, z30.h }, p8, [x25, #0x2, MUL VL]\n" + ".inst 0xc0062c0c // mova { z12.d-z15.d }, za.d[x9, #0]\n" + ".inst 0xc0062c24 // mova { z4.d-z7.d }, za.d[x9, #1]\n" + ".inst 0xc120e194 // fcvt z20.h, { z12.s-z13.s }\n" + ".inst 0xc120e1dc // fcvt z28.h, { z14.s-z15.s }\n" + ".inst 0xa1602734 // st1h { z20.h, z28.h }, pn9.b, [x25]\n" + ".inst 0xc120e09a // fcvt z26.h, { z4.s-z5.s }\n" + ".inst 0xc120e0db // fcvt z27.h, { z6.s-z7.s }\n" + ".inst 0xa061233a // st1h { z26.h-z27.h }, p8, [x25, #0x2, MUL VL]\n" "addvl x25, x25, #4\n" "19:" // Width 2: Output done "b 36f\n" @@ -289,14 +312,36 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "msub x20, x28, x20, %x[N]\n" "mov x22, %x[K]\n" ".inst 0xf8b54af8 // rprfm pldmany, x21, [x23]\n" - ".inst 0x257467f0 // whilelt p8.h, XZR, x20, VLx4\n" + ".inst 0x257447f0 // whilelt p8.h, XZR, x20, VLx2\n" "cbz x24, 21f\n" - ".inst 0xa040c718 // ld1w { z24.s-z27.s }, pn9.b/Z, [x24]\n" - ".inst 0xa041c70c // ld1w { z12.s-z15.s }, pn9.b/Z, [x24, #0x4, MUL VL]\n" - ".inst 0xa042c708 // ld1w { z8.s-z11.s }, pn9.b/Z, [x24, #0x8, MUL VL]\n" - ".inst 0xc0042f00 // mova za.d[x9, #0], { z24.d-z27.d }\n" - ".inst 0xc0042d81 // mova za.d[x9, #1], { z12.d-z15.d }\n" - ".inst 0xc0042d02 // mova za.d[x9, #2], { z8.d-z11.d }\n" + "addvl x20, x24, #4\n" + "ld1h { z16.s }, p1/Z, [x24]\n" + "ld1h { z17.s }, p1/Z, [x24, #1, MUL VL]\n" + "ld1h { z18.s }, p1/Z, [x24, #2, MUL VL]\n" + "ld1h { z19.s }, p1/Z, [x24, #3, MUL VL]\n" + "fcvt z16.s, p1/m, z16.h\n" + "ld1h { z8.s }, p1/Z, [x24, #4, MUL VL]\n" + "fcvt z17.s, p1/m, z17.h\n" + "ld1h { z9.s }, p1/Z, [x24, #5, MUL VL]\n" + "fcvt z18.s, p1/m, z18.h\n" + "ld1h { z10.s }, p1/Z, [x24, #6, MUL VL]\n" + "fcvt z19.s, p1/m, z19.h\n" + "ld1h { z11.s }, p1/Z, [x24, #7, MUL VL]\n" + "fcvt z8.s, p1/m, z8.h\n" + "ld1h { z24.s }, p1/Z, [x20]\n" + "fcvt z9.s, p1/m, z9.h\n" + "ld1h { z25.s }, p1/Z, [x20, #1, MUL VL]\n" + "fcvt z10.s, p1/m, z10.h\n" + "ld1h { z26.s }, p1/Z, [x20, #2, MUL VL]\n" + "fcvt z11.s, p1/m, z11.h\n" + ".inst 0xc0042e00 // mova za.d[x9, #0], { z16.d-z19.d }\n" + "ld1h { z27.s }, p1/Z, [x20, #3, MUL VL]\n" + "fcvt z24.s, p1/m, z24.h\n" + "fcvt z25.s, p1/m, z25.h\n" + "fcvt z26.s, p1/m, z26.h\n" + "fcvt z27.s, p1/m, z27.h\n" + ".inst 0xc0042d01 // mova za.d[x9, #1], { z8.d-z11.d }\n" + ".inst 0xc0042f02 // mova za.d[x9, #2], { z24.d-z27.d }\n" "b 22f\n" "21:" // Width 3: no bias ".inst 0xc00800ff // zero { zad0, zad1, zad2, zad3, zad4, zad5, zad6, zad7 }\n" @@ -305,112 +350,112 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "ble 24f\n" "23:" // Width 3: Multiply loop: Main loop head "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27]\n" "sub x22, x22, #0x8\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z6.h }, p0/Z, [x23]\n" "cmp x22, #0x8\n" "add x23, x23, #0x10\n" - ".inst 0xa041a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - "addvl x27, x27, #16\n" - ".inst 0xc157b188 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[0]\n" - ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b309 // fdot za.s[x9, 1], { z24.h-z27.h }, z7.h[0]\n" - ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157b38a // fdot za.s[x9, 2], { z28.h-z31.h }, z7.h[0]\n" - ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b408 // fdot za.s[x9, 0], { z0.h-z3.h }, z7.h[1]\n" + ".inst 0xc156b288 // fdot za.s[x9, 0], { z20.h-z23.h }, z6.h[0]\n" ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b609 // fdot za.s[x9, 1], { z16.h-z19.h }, z7.h[1]\n" - ".inst 0xa041a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157b58a // fdot za.s[x9, 2], { z12.h-z15.h }, z7.h[1]\n" + ".inst 0xc156b189 // fdot za.s[x9, 1], { z12.h-z15.h }, z6.h[0]\n" + ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc156b00a // fdot za.s[x9, 2], { z0.h-z3.h }, z6.h[0]\n" ".inst 0xa042a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bb88 // fdot za.s[x9, 0], { z28.h-z31.h }, z7.h[2]\n" - ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b909 // fdot za.s[x9, 1], { z8.h-z11.h }, z7.h[2]\n" + ".inst 0xa040a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27]\n" + ".inst 0xc156b788 // fdot za.s[x9, 0], { z28.h-z31.h }, z6.h[1]\n" + ".inst 0xa041a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc156b589 // fdot za.s[x9, 1], { z12.h-z15.h }, z6.h[1]\n" + ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + "addvl x27, x27, #16\n" + ".inst 0xc156b40a // fdot za.s[x9, 2], { z0.h-z3.h }, z6.h[1]\n" + ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157b80a // fdot za.s[x9, 2], { z0.h-z3.h }, z7.h[2]\n" + ".inst 0xc156ba88 // fdot za.s[x9, 0], { z20.h-z23.h }, z6.h[2]\n" ".inst 0xa042a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bd88 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[3]\n" - ".inst 0xc157be09 // fdot za.s[x9, 1], { z16.h-z19.h }, z7.h[3]\n" - ".inst 0xc157be8a // fdot za.s[x9, 2], { z20.h-z23.h }, z7.h[3]\n" + ".inst 0xc156b909 // fdot za.s[x9, 1], { z8.h-z11.h }, z6.h[2]\n" + ".inst 0xc156b98a // fdot za.s[x9, 2], { z12.h-z15.h }, z6.h[2]\n" + ".inst 0xc156bc08 // fdot za.s[x9, 0], { z0.h-z3.h }, z6.h[3]\n" + ".inst 0xc156be09 // fdot za.s[x9, 1], { z16.h-z19.h }, z6.h[3]\n" + ".inst 0xc156be8a // fdot za.s[x9, 2], { z20.h-z23.h }, z6.h[3]\n" "bgt 23b\n" "24:" // Width 3: Multiply loop: Single iteration only "whilelt p0.h, XZR, x22\n" ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z11.h }, p0/Z, [x23]\n" "add x23, x23, #0x10\n" - ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b188 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[0]\n" - ".inst 0xc157b209 // fdot za.s[x9, 1], { z16.h-z19.h }, z7.h[0]\n" - ".inst 0xc157b10a // fdot za.s[x9, 2], { z8.h-z11.h }, z7.h[0]\n" + ".inst 0xc15bb188 // fdot za.s[x9, 0], { z12.h-z15.h }, z11.h[0]\n" + ".inst 0xc15bb009 // fdot za.s[x9, 1], { z0.h-z3.h }, z11.h[0]\n" + ".inst 0xc15bb20a // fdot za.s[x9, 2], { z16.h-z19.h }, z11.h[0]\n" "ble 25f\n" - ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" ".inst 0xa042a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b608 // fdot za.s[x9, 0], { z16.h-z19.h }, z7.h[1]\n" - ".inst 0xc157b409 // fdot za.s[x9, 1], { z0.h-z3.h }, z7.h[1]\n" - ".inst 0xc157b68a // fdot za.s[x9, 2], { z20.h-z23.h }, z7.h[1]\n" + ".inst 0xc15bb588 // fdot za.s[x9, 0], { z12.h-z15.h }, z11.h[1]\n" + ".inst 0xc15bb609 // fdot za.s[x9, 1], { z16.h-z19.h }, z11.h[1]\n" + ".inst 0xc15bb68a // fdot za.s[x9, 2], { z20.h-z23.h }, z11.h[1]\n" "ble 25f\n" - ".inst 0xa040a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - ".inst 0xa041a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bb08 // fdot za.s[x9, 0], { z24.h-z27.h }, z7.h[2]\n" - ".inst 0xc157ba89 // fdot za.s[x9, 1], { z20.h-z23.h }, z7.h[2]\n" - ".inst 0xc157b90a // fdot za.s[x9, 2], { z8.h-z11.h }, z7.h[2]\n" + ".inst 0xc15bb888 // fdot za.s[x9, 0], { z4.h-z7.h }, z11.h[2]\n" + ".inst 0xc15bbb89 // fdot za.s[x9, 1], { z28.h-z31.h }, z11.h[2]\n" + ".inst 0xc15bba8a // fdot za.s[x9, 2], { z20.h-z23.h }, z11.h[2]\n" "ble 25f\n" - ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bc08 // fdot za.s[x9, 0], { z0.h-z3.h }, z7.h[3]\n" - ".inst 0xc157bf89 // fdot za.s[x9, 1], { z28.h-z31.h }, z7.h[3]\n" - ".inst 0xc157bd8a // fdot za.s[x9, 2], { z12.h-z15.h }, z7.h[3]\n" + ".inst 0xc15bbc88 // fdot za.s[x9, 0], { z4.h-z7.h }, z11.h[3]\n" + ".inst 0xc15bbf89 // fdot za.s[x9, 1], { z28.h-z31.h }, z11.h[3]\n" + ".inst 0xc15bbd8a // fdot za.s[x9, 2], { z12.h-z15.h }, z11.h[3]\n" "25:" // Width 3: Multiply loop: multiply skip "tbz %x[flags], #1, 26f\n" ".inst 0xc0062c0c // mova { z12.d-z15.d }, za.d[x9, #0]\n" "add x21, %x[args_ptr], %[offset_min]\n" "add x20, %x[args_ptr], %[offset_max]\n" - ".inst 0xc0062c24 // mova { z4.d-z7.d }, za.d[x9, #1]\n" + ".inst 0xc0062c20 // mova { z0.d-z3.d }, za.d[x9, #1]\n" "ld1rh { z17.h }, p1/Z, [x21]\n" - ".inst 0xc0062c40 // mova { z0.d-z3.d }, za.d[x9, #2]\n" + ".inst 0xc0062c44 // mova { z4.d-z7.d }, za.d[x9, #2]\n" "ld1rh { z16.h }, p1/Z, [x20]\n" ".inst 0xc120e18c // fcvt z12.h, { z12.s-z13.s }\n" ".inst 0xc120e1cd // fcvt z13.h, { z14.s-z15.s }\n" - ".inst 0xc120e092 // fcvt z18.h, { z4.s-z5.s }\n" - ".inst 0xc120e0d3 // fcvt z19.h, { z6.s-z7.s }\n" - ".inst 0xc170c22c // fclamp { z12.h-z13.h }, z17.h, z16.h\n" - ".inst 0xc170c232 // fclamp { z18.h-z19.h }, z17.h, z16.h\n" ".inst 0xc120e00e // fcvt z14.h, { z0.s-z1.s }\n" ".inst 0xc120e04f // fcvt z15.h, { z2.s-z3.s }\n" + ".inst 0xc170c22c // fclamp { z12.h-z13.h }, z17.h, z16.h\n" + ".inst 0xc120e092 // fcvt z18.h, { z4.s-z5.s }\n" + ".inst 0xc120e0d3 // fcvt z19.h, { z6.s-z7.s }\n" ".inst 0xc170c22e // fclamp { z14.h-z15.h }, z17.h, z16.h\n" + ".inst 0xc170c232 // fclamp { z18.h-z19.h }, z17.h, z16.h\n" ".inst 0xa060272c // st1h { z12.h-z13.h }, pn9.b, [x25]\n" - ".inst 0xa0612732 // st1h { z18.h-z19.h }, pn9.b, [x25, #0x2, MUL VL]\n" - ".inst 0xa062232e // st1h { z14.h-z15.h }, p8, [x25, #0x4, MUL VL]\n" + ".inst 0xa061272e // st1h { z14.h-z15.h }, pn9.b, [x25, #0x2, MUL VL]\n" + ".inst 0xa0622332 // st1h { z18.h-z19.h }, p8, [x25, #0x4, MUL VL]\n" "addvl x25, x25, #6\n" "b 27f\n" "26:" // Width 3: No activation - ".inst 0xc0062c04 // mova { z4.d-z7.d }, za.d[x9, #0]\n" - ".inst 0xc0062c20 // mova { z0.d-z3.d }, za.d[x9, #1]\n" - ".inst 0xc0062c48 // mova { z8.d-z11.d }, za.d[x9, #2]\n" - ".inst 0xc120e091 // fcvt z17.h, { z4.s-z5.s }\n" - ".inst 0xc120e0d9 // fcvt z25.h, { z6.s-z7.s }\n" + ".inst 0xc0062c18 // mova { z24.d-z27.d }, za.d[x9, #0]\n" + ".inst 0xc0062c28 // mova { z8.d-z11.d }, za.d[x9, #1]\n" + ".inst 0xc0062c4c // mova { z12.d-z15.d }, za.d[x9, #2]\n" + ".inst 0xc120e311 // fcvt z17.h, { z24.s-z25.s }\n" + ".inst 0xc120e359 // fcvt z25.h, { z26.s-z27.s }\n" ".inst 0xa1602731 // st1h { z17.h, z25.h }, pn9.b, [x25]\n" - ".inst 0xc120e012 // fcvt z18.h, { z0.s-z1.s }\n" - ".inst 0xc120e053 // fcvt z19.h, { z2.s-z3.s }\n" + ".inst 0xc120e112 // fcvt z18.h, { z8.s-z9.s }\n" + ".inst 0xc120e153 // fcvt z19.h, { z10.s-z11.s }\n" ".inst 0xa0612732 // st1h { z18.h-z19.h }, pn9.b, [x25, #0x2, MUL VL]\n" - ".inst 0xc120e111 // fcvt z17.h, { z8.s-z9.s }\n" - ".inst 0xc120e159 // fcvt z25.h, { z10.s-z11.s }\n" + ".inst 0xc120e191 // fcvt z17.h, { z12.s-z13.s }\n" + ".inst 0xc120e1d9 // fcvt z25.h, { z14.s-z15.s }\n" ".inst 0xa1622331 // st1h { z17.h, z25.h }, p8, [x25, #0x4, MUL VL]\n" "addvl x25, x25, #6\n" "27:" // Width 3: Output done @@ -422,16 +467,45 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "msub x20, x28, x20, %x[N]\n" "mov x22, %x[K]\n" ".inst 0xf8b54af8 // rprfm pldmany, x21, [x23]\n" - ".inst 0x257467f0 // whilelt p8.h, XZR, x20, VLx4\n" + ".inst 0x257447f0 // whilelt p8.h, XZR, x20, VLx2\n" "cbz x24, 29f\n" - ".inst 0xa040c704 // ld1w { z4.s-z7.s }, pn9.b/Z, [x24]\n" - ".inst 0xa041c710 // ld1w { z16.s-z19.s }, pn9.b/Z, [x24, #0x4, MUL VL]\n" - ".inst 0xa042c708 // ld1w { z8.s-z11.s }, pn9.b/Z, [x24, #0x8, MUL VL]\n" - ".inst 0xa043c71c // ld1w { z28.s-z31.s }, pn9.b/Z, [x24, #0xc, MUL VL]\n" - ".inst 0xc0042c80 // mova za.d[x9, #0], { z4.d-z7.d }\n" - "addvl x24, x24, #16\n" - ".inst 0xc0042e01 // mova za.d[x9, #1], { z16.d-z19.d }\n" - ".inst 0xc0042d02 // mova za.d[x9, #2], { z8.d-z11.d }\n" + "addvl x20, x24, #4\n" + "ld1h { z28.s }, p1/Z, [x24]\n" + "ld1h { z29.s }, p1/Z, [x24, #1, MUL VL]\n" + "ld1h { z30.s }, p1/Z, [x24, #2, MUL VL]\n" + "ld1h { z31.s }, p1/Z, [x24, #3, MUL VL]\n" + "fcvt z28.s, p1/m, z28.h\n" + "ld1h { z8.s }, p1/Z, [x24, #4, MUL VL]\n" + "fcvt z29.s, p1/m, z29.h\n" + "ld1h { z9.s }, p1/Z, [x24, #5, MUL VL]\n" + "fcvt z30.s, p1/m, z30.h\n" + "ld1h { z10.s }, p1/Z, [x24, #6, MUL VL]\n" + "fcvt z31.s, p1/m, z31.h\n" + "ld1h { z11.s }, p1/Z, [x24, #7, MUL VL]\n" + "fcvt z8.s, p1/m, z8.h\n" + "addvl x24, x24, #8\n" + "ld1h { z0.s }, p1/Z, [x20]\n" + "fcvt z9.s, p1/m, z9.h\n" + "ld1h { z1.s }, p1/Z, [x20, #1, MUL VL]\n" + "fcvt z10.s, p1/m, z10.h\n" + "ld1h { z2.s }, p1/Z, [x20, #2, MUL VL]\n" + "fcvt z11.s, p1/m, z11.h\n" + ".inst 0xc0042f80 // mova za.d[x9, #0], { z28.d-z31.d }\n" + "ld1h { z3.s }, p1/Z, [x20, #3, MUL VL]\n" + "fcvt z0.s, p1/m, z0.h\n" + "ld1h { z28.s }, p1/Z, [x20, #4, MUL VL]\n" + "fcvt z1.s, p1/m, z1.h\n" + "ld1h { z29.s }, p1/Z, [x20, #5, MUL VL]\n" + "fcvt z2.s, p1/m, z2.h\n" + "ld1h { z30.s }, p1/Z, [x20, #6, MUL VL]\n" + "fcvt z3.s, p1/m, z3.h\n" + ".inst 0xc0042d01 // mova za.d[x9, #1], { z8.d-z11.d }\n" + "ld1h { z31.s }, p1/Z, [x20, #7, MUL VL]\n" + "fcvt z28.s, p1/m, z28.h\n" + "fcvt z29.s, p1/m, z29.h\n" + "fcvt z30.s, p1/m, z30.h\n" + "fcvt z31.s, p1/m, z31.h\n" + ".inst 0xc0042c02 // mova za.d[x9, #2], { z0.d-z3.d }\n" ".inst 0xc0042f83 // mova za.d[x9, #3], { z28.d-z31.d }\n" "b 30f\n" "29:" // Width 4: no bias @@ -441,93 +515,93 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( "ble 32f\n" "31:" // Width 4: Multiply loop: Main loop head "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" "sub x22, x22, #0x8\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z3.h }, p0/Z, [x23]\n" "cmp x22, #0x8\n" "add x23, x23, #0x10\n" - ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b288 // fdot za.s[x9, 0], { z20.h-z23.h }, z7.h[0]\n" + ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa043a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc153b108 // fdot za.s[x9, 0], { z8.h-z11.h }, z3.h[0]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b189 // fdot za.s[x9, 1], { z12.h-z15.h }, z7.h[0]\n" + ".inst 0xc153b389 // fdot za.s[x9, 1], { z28.h-z31.h }, z3.h[0]\n" ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b38a // fdot za.s[x9, 2], { z28.h-z31.h }, z7.h[0]\n" - ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157b10b // fdot za.s[x9, 3], { z8.h-z11.h }, z7.h[0]\n" - ".inst 0xa042a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b588 // fdot za.s[x9, 0], { z12.h-z15.h }, z7.h[1]\n" - "addvl x27, x27, #16\n" - ".inst 0xc157b409 // fdot za.s[x9, 1], { z0.h-z3.h }, z7.h[1]\n" - ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b50a // fdot za.s[x9, 2], { z8.h-z11.h }, z7.h[1]\n" + ".inst 0xc153b30a // fdot za.s[x9, 2], { z24.h-z27.h }, z3.h[0]\n" ".inst 0xa041a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157b70b // fdot za.s[x9, 3], { z24.h-z27.h }, z7.h[1]\n" - ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xc153b08b // fdot za.s[x9, 3], { z4.h-z7.h }, z3.h[0]\n" + ".inst 0xa042a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" ".inst 0xa043a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b808 // fdot za.s[x9, 0], { z0.h-z3.h }, z7.h[2]\n" + ".inst 0xc153b588 // fdot za.s[x9, 0], { z12.h-z15.h }, z3.h[1]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b909 // fdot za.s[x9, 1], { z8.h-z11.h }, z7.h[2]\n" - ".inst 0xa040a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27]\n" - ".inst 0xc157b98a // fdot za.s[x9, 2], { z12.h-z15.h }, z7.h[2]\n" - ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xc157bb0b // fdot za.s[x9, 3], { z24.h-z27.h }, z7.h[2]\n" + ".inst 0xc153b509 // fdot za.s[x9, 1], { z8.h-z11.h }, z3.h[1]\n" + ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" + ".inst 0xc153b60a // fdot za.s[x9, 2], { z16.h-z19.h }, z3.h[1]\n" + ".inst 0xa041a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc153b70b // fdot za.s[x9, 3], { z24.h-z27.h }, z3.h[1]\n" + ".inst 0xa042a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa043a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc153b988 // fdot za.s[x9, 0], { z12.h-z15.h }, z3.h[2]\n" + "addvl x27, x27, #16\n" + ".inst 0xc153b889 // fdot za.s[x9, 1], { z4.h-z7.h }, z3.h[2]\n" + ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" + ".inst 0xc153ba8a // fdot za.s[x9, 2], { z20.h-z23.h }, z3.h[2]\n" + ".inst 0xa041a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xc153b90b // fdot za.s[x9, 3], { z8.h-z11.h }, z3.h[2]\n" ".inst 0xa042a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157bf88 // fdot za.s[x9, 0], { z28.h-z31.h }, z7.h[3]\n" + ".inst 0xa043a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc153bd88 // fdot za.s[x9, 0], { z12.h-z15.h }, z3.h[3]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bc09 // fdot za.s[x9, 1], { z0.h-z3.h }, z7.h[3]\n" - ".inst 0xc157bd0a // fdot za.s[x9, 2], { z8.h-z11.h }, z7.h[3]\n" - ".inst 0xc157bd8b // fdot za.s[x9, 3], { z12.h-z15.h }, z7.h[3]\n" + ".inst 0xc153bc89 // fdot za.s[x9, 1], { z4.h-z7.h }, z3.h[3]\n" + ".inst 0xc153bd0a // fdot za.s[x9, 2], { z8.h-z11.h }, z3.h[3]\n" + ".inst 0xc153be0b // fdot za.s[x9, 3], { z16.h-z19.h }, z3.h[3]\n" "bgt 31b\n" "32:" // Width 4: Multiply loop: Single iteration only "whilelt p0.h, XZR, x22\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - "ld1rqh { z7.h }, p0/Z, [x23]\n" + "ld1rqh { z11.h }, p0/Z, [x23]\n" "add x23, x23, #0x10\n" - ".inst 0xa041a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b108 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[0]\n" + ".inst 0xa041a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa043a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc15bb208 // fdot za.s[x9, 0], { z16.h-z19.h }, z11.h[0]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b009 // fdot za.s[x9, 1], { z0.h-z3.h }, z7.h[0]\n" - ".inst 0xc157b20a // fdot za.s[x9, 2], { z16.h-z19.h }, z7.h[0]\n" - ".inst 0xc157b18b // fdot za.s[x9, 3], { z12.h-z15.h }, z7.h[0]\n" + ".inst 0xc15bb089 // fdot za.s[x9, 1], { z4.h-z7.h }, z11.h[0]\n" + ".inst 0xc15bb18a // fdot za.s[x9, 2], { z12.h-z15.h }, z11.h[0]\n" + ".inst 0xc15bb38b // fdot za.s[x9, 3], { z28.h-z31.h }, z11.h[0]\n" "ble 33f\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b508 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[1]\n" + ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa043a779 // ldnt1h { z24.h-z27.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc15bb488 // fdot za.s[x9, 0], { z4.h-z7.h }, z11.h[1]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b789 // fdot za.s[x9, 1], { z28.h-z31.h }, z7.h[1]\n" - ".inst 0xc157b40a // fdot za.s[x9, 2], { z0.h-z3.h }, z7.h[1]\n" - ".inst 0xc157b68b // fdot za.s[x9, 3], { z20.h-z23.h }, z7.h[1]\n" + ".inst 0xc15bb609 // fdot za.s[x9, 1], { z16.h-z19.h }, z11.h[1]\n" + ".inst 0xc15bb58a // fdot za.s[x9, 2], { z12.h-z15.h }, z11.h[1]\n" + ".inst 0xc15bb70b // fdot za.s[x9, 3], { z24.h-z27.h }, z11.h[1]\n" "ble 33f\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" + ".inst 0xa040a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27]\n" "subs x22, x22, #0x2\n" - ".inst 0xa041a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" - ".inst 0xa043a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157b908 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[2]\n" + ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa043a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" + ".inst 0xc15bb988 // fdot za.s[x9, 0], { z12.h-z15.h }, z11.h[2]\n" "addvl x27, x27, #16\n" - ".inst 0xc157b989 // fdot za.s[x9, 1], { z12.h-z15.h }, z7.h[2]\n" - ".inst 0xc157bb8a // fdot za.s[x9, 2], { z28.h-z31.h }, z7.h[2]\n" - ".inst 0xc157ba0b // fdot za.s[x9, 3], { z16.h-z19.h }, z7.h[2]\n" + ".inst 0xc15bbb89 // fdot za.s[x9, 1], { z28.h-z31.h }, z11.h[2]\n" + ".inst 0xc15bb80a // fdot za.s[x9, 2], { z0.h-z3.h }, z11.h[2]\n" + ".inst 0xc15bb88b // fdot za.s[x9, 3], { z4.h-z7.h }, z11.h[2]\n" "ble 33f\n" - ".inst 0xa040a769 // ldnt1h { z8.h-z11.h }, pn9.b/Z, [x27]\n" - ".inst 0xa041a77d // ldnt1h { z28.h-z31.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" - ".inst 0xa042a76d // ldnt1h { z12.h-z15.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" + ".inst 0xa040a761 // ldnt1h { z0.h-z3.h }, pn9.b/Z, [x27]\n" + ".inst 0xa041a771 // ldnt1h { z16.h-z19.h }, pn9.b/Z, [x27, #0x4, MUL VL]\n" + ".inst 0xa042a765 // ldnt1h { z4.h-z7.h }, pn9.b/Z, [x27, #0x8, MUL VL]\n" ".inst 0xa043a775 // ldnt1h { z20.h-z23.h }, pn9.b/Z, [x27, #0xc, MUL VL]\n" - ".inst 0xc157bd08 // fdot za.s[x9, 0], { z8.h-z11.h }, z7.h[3]\n" + ".inst 0xc15bbc08 // fdot za.s[x9, 0], { z0.h-z3.h }, z11.h[3]\n" "addvl x27, x27, #16\n" - ".inst 0xc157bf89 // fdot za.s[x9, 1], { z28.h-z31.h }, z7.h[3]\n" - ".inst 0xc157bd8a // fdot za.s[x9, 2], { z12.h-z15.h }, z7.h[3]\n" - ".inst 0xc157be8b // fdot za.s[x9, 3], { z20.h-z23.h }, z7.h[3]\n" + ".inst 0xc15bbe09 // fdot za.s[x9, 1], { z16.h-z19.h }, z11.h[3]\n" + ".inst 0xc15bbc8a // fdot za.s[x9, 2], { z4.h-z7.h }, z11.h[3]\n" + ".inst 0xc15bbe8b // fdot za.s[x9, 3], { z20.h-z23.h }, z11.h[3]\n" "33:" // Width 4: Multiply loop: multiply skip "tbz %x[flags], #1, 34f\n" ".inst 0xc0062c1c // mova { z28.d-z31.d }, za.d[x9, #0]\n" @@ -543,12 +617,12 @@ void sme2_gemv_fp16fp32fp16_dot_16VL ( ".inst 0xc120e18c // fcvt z12.h, { z12.s-z13.s }\n" ".inst 0xc120e1cd // fcvt z13.h, { z14.s-z15.s }\n" ".inst 0xc172c26a // fclamp { z10.h-z11.h }, z19.h, z18.h\n" - ".inst 0xc172c26c // fclamp { z12.h-z13.h }, z19.h, z18.h\n" ".inst 0xc120e00e // fcvt z14.h, { z0.s-z1.s }\n" ".inst 0xc120e04f // fcvt z15.h, { z2.s-z3.s }\n" - ".inst 0xc172c26e // fclamp { z14.h-z15.h }, z19.h, z18.h\n" + ".inst 0xc172c26c // fclamp { z12.h-z13.h }, z19.h, z18.h\n" ".inst 0xc120e090 // fcvt z16.h, { z4.s-z5.s }\n" ".inst 0xc120e0d1 // fcvt z17.h, { z6.s-z7.s }\n" + ".inst 0xc172c26e // fclamp { z14.h-z15.h }, z19.h, z18.h\n" ".inst 0xc172c270 // fclamp { z16.h-z17.h }, z19.h, z18.h\n" ".inst 0xa060272a // st1h { z10.h-z11.h }, pn9.b, [x25]\n" ".inst 0xa061272c // st1h { z12.h-z13.h }, pn9.b, [x25, #0x2, MUL VL]\n" -- cgit v1.2.1