diff options
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp | 749 |
1 files changed, 373 insertions, 376 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp b/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp index 0e98cc6def..c2b6dd1030 100644 --- a/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp +++ b/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_fp32bf16fp32_mmla_4x6VL/generic.cpp @@ -50,19 +50,18 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( size_t output_offset = {}; size_t input_initial_col = {}; size_t input_offset = {}; - void *output_ptr = {}; - const float *bias = {}; } ka; unsigned long flags=0; + void *output_ptr; void *input_ptr; if (output_arg.is_indirect) { - ka.output_ptr=(void *)(output_arg.indirect.ptr); + output_ptr=(void *)(output_arg.indirect.ptr); ka.output_offset=output_arg.indirect.offset; flags |= 0x4; } else { - ka.output_ptr=(void *)(output_arg.direct.base); + output_ptr=(void *)(output_arg.direct.base); ka.output_offset=output_arg.direct.stride; } @@ -83,7 +82,6 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( ka.string_lengths = string_lengths; ka.N = N; ka.B_ptr = B_ptr; - ka.bias = bias; ka.B_stride = B_stride; switch(act.type) { default: @@ -106,17 +104,17 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "bgt 29f\n" "beq 15f\n" "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" - "ldr x15, [%x[args_ptr], %[offsetof_bias]]\n" + "mov x15, %x[bias]\n" "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" - "ldr x13, [%x[args_ptr], %[offsetof_output_ptr]]\n" + "mov x13, %x[output_ptr]\n" "2:" // Height 1: Column loop "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" - "cntw x21, ALL, MUL #5\n" "add x11, x12, x20, LSL #1\n" "add x10, x11, x20, LSL #1\n" "add x9, x10, x20, LSL #1\n" + "cntw x21, ALL, MUL #5\n" "add x28, x9, x20, LSL #1\n" "add x27, x28, x20, LSL #1\n" "add x20, x27, x20, LSL #1\n" @@ -124,20 +122,20 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "bgt 3f\n" "decw x21\n" - "mov x27, x12\n" "cmp x14, x21\n" + "mov x27, x12\n" "bgt 3f\n" "decw x21\n" - "mov x28, x12\n" "cmp x14, x21\n" + "mov x28, x12\n" "bgt 3f\n" "decw x21\n" - "mov x9, x12\n" "cmp x14, x21\n" + "mov x9, x12\n" "bgt 3f\n" "decw x21\n" - "mov x10, x12\n" "cmp x14, x21\n" + "mov x10, x12\n" "bgt 3f\n" "mov x11, x12\n" "3:" // Height 1: B setup done @@ -156,19 +154,19 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "cbz x15, 4f\n" "ld1w { z8.s }, p7/Z, [x15]\n" "ld1w { z9.s }, p7/Z, [x15, #1, MUL VL]\n" - "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" - "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" - "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" - "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" - "addvl x15, x15, #6\n" "zip2 z14.d, z8.d, z8.d\n" "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" "zip2 z15.d, z9.d, z9.d\n" "zip1 z9.d, z9.d, z9.d\n" + "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" + "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" "zip2 z16.d, z10.d, z10.d\n" "zip1 z10.d, z10.d, z10.d\n" "zip2 z17.d, z11.d, z11.d\n" "zip1 z11.d, z11.d, z11.d\n" + "addvl x15, x15, #6\n" "zip2 z18.d, z12.d, z12.d\n" "zip1 z12.d, z12.d, z12.d\n" "zip2 z19.d, z13.d, z13.d\n" @@ -176,16 +174,16 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "b 6f\n" "4:" // Height 1: no bias "tbz %x[flags], #0, 5f\n" - "ld1w { z25.s }, p6/Z, [x13]\n" - "ld1w { z24.s }, p5/Z, [x13, #1, MUL VL]\n" + "ld1w { z21.s }, p6/Z, [x13]\n" + "ld1w { z20.s }, p5/Z, [x13, #1, MUL VL]\n" + "zip1 z8.d, z21.d, z14.d\n" + "zip2 z14.d, z21.d, z14.d\n" "ld1w { z23.s }, p4/Z, [x13, #2, MUL VL]\n" "ld1w { z22.s }, p3/Z, [x13, #3, MUL VL]\n" + "zip1 z9.d, z20.d, z15.d\n" + "zip2 z15.d, z20.d, z15.d\n" "ld1w { z21.s }, p2/Z, [x13, #4, MUL VL]\n" "ld1w { z20.s }, p1/Z, [x13, #5, MUL VL]\n" - "zip1 z8.d, z25.d, z14.d\n" - "zip2 z14.d, z25.d, z14.d\n" - "zip1 z9.d, z24.d, z15.d\n" - "zip2 z15.d, z24.d, z15.d\n" "zip1 z10.d, z23.d, z16.d\n" "zip2 z16.d, z23.d, z16.d\n" "zip1 z11.d, z22.d, z17.d\n" @@ -212,8 +210,8 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "mov x26, #0x0\n" "7:" // Height 1: String loop "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" - "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "ldr w25, [x20, x26, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "tbz %x[flags], #3, 8f\n" "ldr x20, [%x[input_ptr], x26, LSL #0x3]\n" "add x20, x20, x21, LSL #3\n" @@ -229,78 +227,78 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "ble 11f\n" "10:" // Height 1: Multiply loop: Main loop head "whilelt p0.s, XZR, x25\n" - "ld1h { z23.h }, p7/Z, [x12]\n" - "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" - "sub x25, x25, #0x4\n" - "ld1h { z21.h }, p7/Z, [x11]\n" - "ld1h { z20.h }, p7/Z, [x11, #1, MUL VL]\n" - "cmp x25, #0x4\n" - "addvl x12, x12, #2\n" - "addvl x11, x11, #2\n" "ld1rqw { z24.s }, p0/Z, [x24]\n" - "add x24, x24, #0x10\n" ".inst 0x658abf18 // bfcvt z24.h, p7/M, z24.s\n" "uzp1 z24.h, z24.h, z24.h\n" - ".inst 0x6477e708 // bfmmla z8.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x10]\n" - ".inst 0x6476e70e // bfmmla z14.s, z24.h, z22.h\n" - "ld1h { z22.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" + "ld1h { z21.h }, p7/Z, [x12]\n" + "ld1h { z20.h }, p7/Z, [x12, #1, MUL VL]\n" + ".inst 0x6475e708 // bfmmla z8.s, z24.h, z21.h\n" + ".inst 0x6474e70e // bfmmla z14.s, z24.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x11]\n" + "ld1h { z20.h }, p7/Z, [x11, #1, MUL VL]\n" ".inst 0x6475e709 // bfmmla z9.s, z24.h, z21.h\n" - "ld1h { z21.h }, p7/Z, [x9]\n" ".inst 0x6474e70f // bfmmla z15.s, z24.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x10]\n" + "ld1h { z20.h }, p7/Z, [x10, #1, MUL VL]\n" + ".inst 0x6475e70a // bfmmla z10.s, z24.h, z21.h\n" + ".inst 0x6474e710 // bfmmla z16.s, z24.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x9]\n" "ld1h { z20.h }, p7/Z, [x9, #1, MUL VL]\n" - "addvl x9, x9, #2\n" - ".inst 0x6477e70a // bfmmla z10.s, z24.h, z23.h\n" + ".inst 0x6475e70b // bfmmla z11.s, z24.h, z21.h\n" + ".inst 0x6474e711 // bfmmla z17.s, z24.h, z20.h\n" "ld1h { z23.h }, p7/Z, [x28]\n" - ".inst 0x6476e710 // bfmmla z16.s, z24.h, z22.h\n" "ld1h { z22.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" - ".inst 0x6475e70b // bfmmla z11.s, z24.h, z21.h\n" + "sub x25, x25, #0x4\n" + "cmp x25, #0x4\n" "ld1h { z21.h }, p7/Z, [x27]\n" - ".inst 0x6474e711 // bfmmla z17.s, z24.h, z20.h\n" "ld1h { z20.h }, p7/Z, [x27, #1, MUL VL]\n" - "addvl x27, x27, #2\n" ".inst 0x6477e70c // bfmmla z12.s, z24.h, z23.h\n" ".inst 0x6476e712 // bfmmla z18.s, z24.h, z22.h\n" ".inst 0x6475e70d // bfmmla z13.s, z24.h, z21.h\n" ".inst 0x6474e713 // bfmmla z19.s, z24.h, z20.h\n" + "add x24, x24, #0x10\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "addvl x28, x28, #2\n" + "addvl x27, x27, #2\n" "bgt 10b\n" "11:" // Height 1: Multiply loop: Single iteration only "whilelt p0.s, XZR, x25\n" - "ld1h { z23.h }, p7/Z, [x12]\n" - "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" - "addvl x12, x12, #2\n" + "ld1rqw { z22.s }, p0/Z, [x24]\n" + ".inst 0x658abed6 // bfcvt z22.h, p7/M, z22.s\n" + "uzp1 z22.h, z22.h, z22.h\n" + "ld1h { z21.h }, p7/Z, [x12]\n" + "ld1h { z20.h }, p7/Z, [x12, #1, MUL VL]\n" + ".inst 0x6475e6c8 // bfmmla z8.s, z22.h, z21.h\n" + ".inst 0x6474e6ce // bfmmla z14.s, z22.h, z20.h\n" "ld1h { z21.h }, p7/Z, [x11]\n" "ld1h { z20.h }, p7/Z, [x11, #1, MUL VL]\n" - "addvl x11, x11, #2\n" - "ld1rqw { z24.s }, p0/Z, [x24]\n" - ".inst 0x658abf18 // bfcvt z24.h, p7/M, z24.s\n" - "uzp1 z24.h, z24.h, z24.h\n" - ".inst 0x6477e708 // bfmmla z8.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x10]\n" - ".inst 0x6476e70e // bfmmla z14.s, z24.h, z22.h\n" - "ld1h { z22.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" - ".inst 0x6475e709 // bfmmla z9.s, z24.h, z21.h\n" + ".inst 0x6475e6c9 // bfmmla z9.s, z22.h, z21.h\n" + ".inst 0x6474e6cf // bfmmla z15.s, z22.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x10]\n" + "ld1h { z20.h }, p7/Z, [x10, #1, MUL VL]\n" + ".inst 0x6475e6ca // bfmmla z10.s, z22.h, z21.h\n" + ".inst 0x6474e6d0 // bfmmla z16.s, z22.h, z20.h\n" "ld1h { z21.h }, p7/Z, [x9]\n" - ".inst 0x6474e70f // bfmmla z15.s, z24.h, z20.h\n" "ld1h { z20.h }, p7/Z, [x9, #1, MUL VL]\n" - "addvl x9, x9, #2\n" - ".inst 0x6477e70a // bfmmla z10.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x28]\n" - ".inst 0x6476e710 // bfmmla z16.s, z24.h, z22.h\n" - "ld1h { z22.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" - ".inst 0x6475e70b // bfmmla z11.s, z24.h, z21.h\n" + ".inst 0x6475e6cb // bfmmla z11.s, z22.h, z21.h\n" + ".inst 0x6474e6d1 // bfmmla z17.s, z22.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x28]\n" + "ld1h { z20.h }, p7/Z, [x28, #1, MUL VL]\n" + ".inst 0x6475e6cc // bfmmla z12.s, z22.h, z21.h\n" + ".inst 0x6474e6d2 // bfmmla z18.s, z22.h, z20.h\n" "ld1h { z21.h }, p7/Z, [x27]\n" - ".inst 0x6474e711 // bfmmla z17.s, z24.h, z20.h\n" "ld1h { z20.h }, p7/Z, [x27, #1, MUL VL]\n" + ".inst 0x6475e6cd // bfmmla z13.s, z22.h, z21.h\n" + ".inst 0x6474e6d3 // bfmmla z19.s, z22.h, z20.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "addvl x28, x28, #2\n" "addvl x27, x27, #2\n" - ".inst 0x6477e70c // bfmmla z12.s, z24.h, z23.h\n" - ".inst 0x6476e712 // bfmmla z18.s, z24.h, z22.h\n" - ".inst 0x6475e70d // bfmmla z13.s, z24.h, z21.h\n" - ".inst 0x6474e713 // bfmmla z19.s, z24.h, z20.h\n" "12:" // Height 1: Multiply loop: multiply skip "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" "add x26, x26, #0x1\n" @@ -313,9 +311,9 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "uzp1 z12.d, z12.d, z18.d\n" "uzp1 z13.d, z13.d, z19.d\n" "tbz %x[flags], #1, 13f\n" - "add x21, %x[args_ptr], %[offset_max]\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z21.s }, p7/Z, [x20]\n" "add x20, %x[args_ptr], %[offset_min]\n" - "ld1rw { z21.s }, p7/Z, [x21]\n" "ld1rw { z20.s }, p7/Z, [x20]\n" "fmin z8.s, p7/M, z8.s, z21.s\n" "fmin z9.s, p7/M, z9.s, z21.s\n" @@ -344,17 +342,17 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "b 58f\n" "15:" // Height 2 "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" - "ldr x15, [%x[args_ptr], %[offsetof_bias]]\n" + "mov x15, %x[bias]\n" "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" - "ldr x13, [%x[args_ptr], %[offsetof_output_ptr]]\n" + "mov x13, %x[output_ptr]\n" "16:" // Height 2: Column loop "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" - "cntw x21, ALL, MUL #5\n" "add x11, x12, x20, LSL #1\n" "add x10, x11, x20, LSL #1\n" "add x9, x10, x20, LSL #1\n" + "cntw x21, ALL, MUL #5\n" "add x28, x9, x20, LSL #1\n" "add x27, x28, x20, LSL #1\n" "add x20, x27, x20, LSL #1\n" @@ -362,20 +360,20 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "bgt 17f\n" "decw x21\n" - "mov x27, x12\n" "cmp x14, x21\n" + "mov x27, x12\n" "bgt 17f\n" "decw x21\n" - "mov x28, x12\n" "cmp x14, x21\n" + "mov x28, x12\n" "bgt 17f\n" "decw x21\n" - "mov x9, x12\n" "cmp x14, x21\n" + "mov x9, x12\n" "bgt 17f\n" "decw x21\n" - "mov x10, x12\n" "cmp x14, x21\n" + "mov x10, x12\n" "bgt 17f\n" "mov x11, x12\n" "17:" // Height 2: B setup done @@ -394,19 +392,19 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "cbz x15, 18f\n" "ld1w { z8.s }, p7/Z, [x15]\n" "ld1w { z9.s }, p7/Z, [x15, #1, MUL VL]\n" - "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" - "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" - "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" - "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" - "addvl x15, x15, #6\n" "zip2 z14.d, z8.d, z8.d\n" "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" "zip2 z15.d, z9.d, z9.d\n" "zip1 z9.d, z9.d, z9.d\n" + "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" + "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" "zip2 z16.d, z10.d, z10.d\n" "zip1 z10.d, z10.d, z10.d\n" "zip2 z17.d, z11.d, z11.d\n" "zip1 z11.d, z11.d, z11.d\n" + "addvl x15, x15, #6\n" "zip2 z18.d, z12.d, z12.d\n" "zip1 z12.d, z12.d, z12.d\n" "zip2 z19.d, z13.d, z13.d\n" @@ -415,25 +413,25 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "18:" // Height 2: no bias "tbz %x[flags], #0, 19f\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" - "ld1w { z25.s }, p6/Z, [x13]\n" - "ld1w { z24.s }, p5/Z, [x13, #1, MUL VL]\n" - "ld1w { z23.s }, p4/Z, [x13, #2, MUL VL]\n" + "add x20, x13, x20, LSL #2\n" + "ld1w { z16.s }, p6/Z, [x13]\n" + "ld1w { z17.s }, p5/Z, [x13, #1, MUL VL]\n" + "ld1w { z19.s }, p4/Z, [x13, #2, MUL VL]\n" "ld1w { z22.s }, p3/Z, [x13, #3, MUL VL]\n" "ld1w { z21.s }, p2/Z, [x13, #4, MUL VL]\n" - "add x20, x13, x20, LSL #2\n" "ld1w { z20.s }, p1/Z, [x13, #5, MUL VL]\n" "ld1w { z14.s }, p6/Z, [x20]\n" + "zip1 z8.d, z16.d, z14.d\n" + "zip2 z14.d, z16.d, z14.d\n" "ld1w { z15.s }, p5/Z, [x20, #1, MUL VL]\n" "ld1w { z16.s }, p4/Z, [x20, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z15.d\n" + "zip2 z15.d, z17.d, z15.d\n" "ld1w { z17.s }, p3/Z, [x20, #3, MUL VL]\n" "ld1w { z18.s }, p2/Z, [x20, #4, MUL VL]\n" + "zip1 z10.d, z19.d, z16.d\n" + "zip2 z16.d, z19.d, z16.d\n" "ld1w { z19.s }, p1/Z, [x20, #5, MUL VL]\n" - "zip1 z8.d, z25.d, z14.d\n" - "zip2 z14.d, z25.d, z14.d\n" - "zip1 z9.d, z24.d, z15.d\n" - "zip2 z15.d, z24.d, z15.d\n" - "zip1 z10.d, z23.d, z16.d\n" - "zip2 z16.d, z23.d, z16.d\n" "zip1 z11.d, z22.d, z17.d\n" "zip2 z17.d, z22.d, z17.d\n" "zip1 z12.d, z21.d, z18.d\n" @@ -458,8 +456,8 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "mov x26, #0x0\n" "21:" // Height 2: String loop "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" - "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "ldr w25, [x20, x26, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "tbz %x[flags], #3, 22f\n" "ldr x20, [%x[input_ptr], x26, LSL #0x3]\n" "add x20, x20, x21, LSL #3\n" @@ -478,87 +476,87 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "ble 25f\n" "24:" // Height 2: Multiply loop: Main loop head "whilelt p0.s, XZR, x25\n" - "ld1h { z23.h }, p7/Z, [x12]\n" - "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" - "sub x25, x25, #0x4\n" - "ld1h { z21.h }, p7/Z, [x11]\n" - "ld1h { z25.h }, p7/Z, [x11, #1, MUL VL]\n" - "cmp x25, #0x4\n" - "addvl x12, x12, #2\n" - "addvl x11, x11, #2\n" "ld1rqw { z24.s }, p0/Z, [x24]\n" - "add x24, x24, #0x10\n" "ld1rqw { z20.s }, p0/Z, [x23]\n" - "add x23, x23, #0x10\n" ".inst 0x658abf18 // bfcvt z24.h, p7/M, z24.s\n" ".inst 0x658abe94 // bfcvt z20.h, p7/M, z20.s\n" "uzp1 z24.h, z24.h, z24.h\n" + "ld1h { z23.h }, p7/Z, [x12]\n" + "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" "uzp1 z20.h, z20.h, z20.h\n" "trn1 z24.d, z24.d, z20.d\n" + "ld1h { z21.h }, p7/Z, [x11]\n" + "ld1h { z20.h }, p7/Z, [x11, #1, MUL VL]\n" ".inst 0x6477e708 // bfmmla z8.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x10]\n" ".inst 0x6476e70e // bfmmla z14.s, z24.h, z22.h\n" + "ld1h { z23.h }, p7/Z, [x10]\n" "ld1h { z22.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" ".inst 0x6475e709 // bfmmla z9.s, z24.h, z21.h\n" + ".inst 0x6474e70f // bfmmla z15.s, z24.h, z20.h\n" "ld1h { z21.h }, p7/Z, [x9]\n" - ".inst 0x6479e70f // bfmmla z15.s, z24.h, z25.h\n" "ld1h { z20.h }, p7/Z, [x9, #1, MUL VL]\n" - "addvl x9, x9, #2\n" ".inst 0x6477e70a // bfmmla z10.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x28]\n" ".inst 0x6476e710 // bfmmla z16.s, z24.h, z22.h\n" + "ld1h { z23.h }, p7/Z, [x28]\n" "ld1h { z22.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" ".inst 0x6475e70b // bfmmla z11.s, z24.h, z21.h\n" - "ld1h { z21.h }, p7/Z, [x27]\n" ".inst 0x6474e711 // bfmmla z17.s, z24.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x27]\n" "ld1h { z20.h }, p7/Z, [x27, #1, MUL VL]\n" - "addvl x27, x27, #2\n" + "sub x25, x25, #0x4\n" + "cmp x25, #0x4\n" ".inst 0x6477e70c // bfmmla z12.s, z24.h, z23.h\n" ".inst 0x6476e712 // bfmmla z18.s, z24.h, z22.h\n" ".inst 0x6475e70d // bfmmla z13.s, z24.h, z21.h\n" ".inst 0x6474e713 // bfmmla z19.s, z24.h, z20.h\n" + "add x24, x24, #0x10\n" + "add x23, x23, #0x10\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "addvl x28, x28, #2\n" + "addvl x27, x27, #2\n" "bgt 24b\n" "25:" // Height 2: Multiply loop: Single iteration only "whilelt p0.s, XZR, x25\n" - "ld1h { z23.h }, p7/Z, [x12]\n" - "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" - "addvl x12, x12, #2\n" - "ld1h { z21.h }, p7/Z, [x11]\n" - "ld1h { z25.h }, p7/Z, [x11, #1, MUL VL]\n" - "addvl x11, x11, #2\n" "ld1rqw { z24.s }, p0/Z, [x24]\n" "ld1rqw { z20.s }, p0/Z, [x23]\n" ".inst 0x658abf18 // bfcvt z24.h, p7/M, z24.s\n" ".inst 0x658abe94 // bfcvt z20.h, p7/M, z20.s\n" "uzp1 z24.h, z24.h, z24.h\n" + "ld1h { z23.h }, p7/Z, [x12]\n" + "ld1h { z22.h }, p7/Z, [x12, #1, MUL VL]\n" "uzp1 z20.h, z20.h, z20.h\n" "trn1 z24.d, z24.d, z20.d\n" + "ld1h { z21.h }, p7/Z, [x11]\n" + "ld1h { z20.h }, p7/Z, [x11, #1, MUL VL]\n" ".inst 0x6477e708 // bfmmla z8.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x10]\n" ".inst 0x6476e70e // bfmmla z14.s, z24.h, z22.h\n" + "ld1h { z23.h }, p7/Z, [x10]\n" "ld1h { z22.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" ".inst 0x6475e709 // bfmmla z9.s, z24.h, z21.h\n" + ".inst 0x6474e70f // bfmmla z15.s, z24.h, z20.h\n" "ld1h { z21.h }, p7/Z, [x9]\n" - ".inst 0x6479e70f // bfmmla z15.s, z24.h, z25.h\n" "ld1h { z20.h }, p7/Z, [x9, #1, MUL VL]\n" - "addvl x9, x9, #2\n" ".inst 0x6477e70a // bfmmla z10.s, z24.h, z23.h\n" - "ld1h { z23.h }, p7/Z, [x28]\n" ".inst 0x6476e710 // bfmmla z16.s, z24.h, z22.h\n" + "ld1h { z23.h }, p7/Z, [x28]\n" "ld1h { z22.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" ".inst 0x6475e70b // bfmmla z11.s, z24.h, z21.h\n" - "ld1h { z21.h }, p7/Z, [x27]\n" ".inst 0x6474e711 // bfmmla z17.s, z24.h, z20.h\n" + "ld1h { z21.h }, p7/Z, [x27]\n" "ld1h { z20.h }, p7/Z, [x27, #1, MUL VL]\n" - "addvl x27, x27, #2\n" ".inst 0x6477e70c // bfmmla z12.s, z24.h, z23.h\n" ".inst 0x6476e712 // bfmmla z18.s, z24.h, z22.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" ".inst 0x6475e70d // bfmmla z13.s, z24.h, z21.h\n" ".inst 0x6474e713 // bfmmla z19.s, z24.h, z20.h\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "addvl x28, x28, #2\n" + "addvl x27, x27, #2\n" "26:" // Height 2: Multiply loop: multiply skip "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" "add x26, x26, #0x1\n" @@ -567,21 +565,21 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" "uzp1 z4.d, z8.d, z14.d\n" "uzp2 z8.d, z8.d, z14.d\n" + "add x23, x13, x20, LSL #2\n" "uzp1 z14.d, z9.d, z15.d\n" "uzp2 z9.d, z9.d, z15.d\n" "uzp1 z15.d, z10.d, z16.d\n" "uzp2 z10.d, z10.d, z16.d\n" "uzp1 z16.d, z11.d, z17.d\n" "uzp2 z11.d, z11.d, z17.d\n" - "add x24, x13, x20, LSL #2\n" "uzp1 z17.d, z12.d, z18.d\n" "uzp2 z12.d, z12.d, z18.d\n" "uzp1 z18.d, z13.d, z19.d\n" "uzp2 z13.d, z13.d, z19.d\n" "tbz %x[flags], #1, 27f\n" - "add x21, %x[args_ptr], %[offset_max]\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z20.s }, p7/Z, [x20]\n" "add x20, %x[args_ptr], %[offset_min]\n" - "ld1rw { z20.s }, p7/Z, [x21]\n" "ld1rw { z19.s }, p7/Z, [x20]\n" "fmin z4.s, p7/M, z4.s, z20.s\n" "fmin z14.s, p7/M, z14.s, z20.s\n" @@ -615,12 +613,12 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "st1w { z17.s }, p2, [x13, #4, MUL VL]\n" "st1w { z18.s }, p1, [x13, #5, MUL VL]\n" "addvl x13, x13, #6\n" - "st1w { z8.s }, p6, [x24]\n" - "st1w { z9.s }, p5, [x24, #1, MUL VL]\n" - "st1w { z10.s }, p4, [x24, #2, MUL VL]\n" - "st1w { z11.s }, p3, [x24, #3, MUL VL]\n" - "st1w { z12.s }, p2, [x24, #4, MUL VL]\n" - "st1w { z13.s }, p1, [x24, #5, MUL VL]\n" + "st1w { z8.s }, p6, [x23]\n" + "st1w { z9.s }, p5, [x23, #1, MUL VL]\n" + "st1w { z10.s }, p4, [x23, #2, MUL VL]\n" + "st1w { z11.s }, p3, [x23, #3, MUL VL]\n" + "st1w { z12.s }, p2, [x23, #4, MUL VL]\n" + "st1w { z13.s }, p1, [x23, #5, MUL VL]\n" "28:" // Height 2: Writeback done "decw x14, ALL, MUL #6\n" "cmp x14, XZR\n" @@ -628,17 +626,17 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "b 58f\n" "29:" // Height 3 "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" - "ldr x15, [%x[args_ptr], %[offsetof_bias]]\n" + "mov x15, %x[bias]\n" "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" - "ldr x13, [%x[args_ptr], %[offsetof_output_ptr]]\n" + "mov x13, %x[output_ptr]\n" "30:" // Height 3: Column loop "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" - "cntw x21, ALL, MUL #5\n" "add x11, x12, x20, LSL #1\n" "add x10, x11, x20, LSL #1\n" "add x9, x10, x20, LSL #1\n" + "cntw x21, ALL, MUL #5\n" "add x28, x9, x20, LSL #1\n" "add x27, x28, x20, LSL #1\n" "add x20, x27, x20, LSL #1\n" @@ -646,20 +644,20 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "bgt 31f\n" "decw x21\n" - "mov x27, x12\n" "cmp x14, x21\n" + "mov x27, x12\n" "bgt 31f\n" "decw x21\n" - "mov x28, x12\n" "cmp x14, x21\n" + "mov x28, x12\n" "bgt 31f\n" "decw x21\n" - "mov x9, x12\n" "cmp x14, x21\n" + "mov x9, x12\n" "bgt 31f\n" "decw x21\n" - "mov x10, x12\n" "cmp x14, x21\n" + "mov x10, x12\n" "bgt 31f\n" "mov x11, x12\n" "31:" // Height 3: B setup done @@ -678,19 +676,19 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "cbz x15, 32f\n" "ld1w { z8.s }, p7/Z, [x15]\n" "ld1w { z9.s }, p7/Z, [x15, #1, MUL VL]\n" - "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" - "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" - "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" - "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" - "addvl x15, x15, #6\n" "zip2 z14.d, z8.d, z8.d\n" "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" "zip2 z15.d, z9.d, z9.d\n" "zip1 z9.d, z9.d, z9.d\n" + "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" + "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" "zip2 z16.d, z10.d, z10.d\n" "zip1 z10.d, z10.d, z10.d\n" "zip2 z17.d, z11.d, z11.d\n" "zip1 z11.d, z11.d, z11.d\n" + "addvl x15, x15, #6\n" "zip2 z18.d, z12.d, z12.d\n" "zip1 z12.d, z12.d, z12.d\n" "zip2 z19.d, z13.d, z13.d\n" @@ -711,38 +709,38 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "32:" // Height 3: no bias "tbz %x[flags], #0, 33f\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" - "ld1w { z22.s }, p6/Z, [x13]\n" - "ld1w { z24.s }, p5/Z, [x13, #1, MUL VL]\n" - "ld1w { z0.s }, p4/Z, [x13, #2, MUL VL]\n" - "ld1w { z2.s }, p3/Z, [x13, #3, MUL VL]\n" - "ld1w { z1.s }, p2/Z, [x13, #4, MUL VL]\n" "add x21, x13, x20, LSL #2\n" "add x20, x21, x20, LSL #2\n" + "ld1w { z16.s }, p6/Z, [x13]\n" + "ld1w { z17.s }, p5/Z, [x13, #1, MUL VL]\n" + "ld1w { z19.s }, p4/Z, [x13, #2, MUL VL]\n" + "ld1w { z22.s }, p3/Z, [x13, #3, MUL VL]\n" + "ld1w { z24.s }, p2/Z, [x13, #4, MUL VL]\n" "ld1w { z20.s }, p1/Z, [x13, #5, MUL VL]\n" "ld1w { z14.s }, p6/Z, [x21]\n" + "zip1 z8.d, z16.d, z14.d\n" + "zip2 z14.d, z16.d, z14.d\n" "ld1w { z15.s }, p5/Z, [x21, #1, MUL VL]\n" "ld1w { z16.s }, p4/Z, [x21, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z15.d\n" + "zip2 z15.d, z17.d, z15.d\n" "ld1w { z17.s }, p3/Z, [x21, #3, MUL VL]\n" "ld1w { z18.s }, p2/Z, [x21, #4, MUL VL]\n" + "zip1 z10.d, z19.d, z16.d\n" + "zip2 z16.d, z19.d, z16.d\n" "ld1w { z19.s }, p1/Z, [x21, #5, MUL VL]\n" "ld1w { z21.s }, p6/Z, [x20]\n" - "zip1 z8.d, z22.d, z14.d\n" - "zip2 z14.d, z22.d, z14.d\n" + "zip1 z11.d, z22.d, z17.d\n" + "zip2 z17.d, z22.d, z17.d\n" "ld1w { z22.s }, p5/Z, [x20, #1, MUL VL]\n" "ld1w { z23.s }, p4/Z, [x20, #2, MUL VL]\n" - "zip1 z9.d, z24.d, z15.d\n" - "zip2 z15.d, z24.d, z15.d\n" + "zip1 z12.d, z24.d, z18.d\n" + "zip2 z18.d, z24.d, z18.d\n" "ld1w { z24.s }, p3/Z, [x20, #3, MUL VL]\n" "ld1w { z25.s }, p2/Z, [x20, #4, MUL VL]\n" - "zip1 z10.d, z0.d, z16.d\n" - "zip2 z16.d, z0.d, z16.d\n" - "ld1w { z0.s }, p1/Z, [x20, #5, MUL VL]\n" - "zip1 z11.d, z2.d, z17.d\n" - "zip2 z17.d, z2.d, z17.d\n" - "zip1 z12.d, z1.d, z18.d\n" - "zip2 z18.d, z1.d, z18.d\n" "zip1 z13.d, z20.d, z19.d\n" "zip2 z19.d, z20.d, z19.d\n" + "ld1w { z0.s }, p1/Z, [x20, #5, MUL VL]\n" "zip1 z20.d, z21.d, z26.d\n" "zip2 z26.d, z21.d, z26.d\n" "zip1 z21.d, z22.d, z27.d\n" @@ -785,8 +783,8 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "mov x26, #0x0\n" "35:" // Height 3: String loop "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" - "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "ldr w25, [x20, x26, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "tbz %x[flags], #3, 36f\n" "ldr x20, [%x[input_ptr], x26, LSL #0x3]\n" "add x20, x20, x21, LSL #3\n" @@ -808,111 +806,111 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "ble 39f\n" "38:" // Height 3: Multiply loop: Main loop head "whilelt p0.s, XZR, x25\n" - "ld1h { z3.h }, p7/Z, [x12]\n" - "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" - "sub x25, x25, #0x4\n" - "ld1h { z1.h }, p7/Z, [x11]\n" - "ld1h { z6.h }, p7/Z, [x11, #1, MUL VL]\n" - "cmp x25, #0x4\n" - "addvl x12, x12, #2\n" - "addvl x11, x11, #2\n" "ld1rqw { z5.s }, p0/Z, [x24]\n" - "add x24, x24, #0x10\n" "ld1rqw { z0.s }, p0/Z, [x23]\n" - "ld1rqw { z4.s }, p0/Z, [x22]\n" - "add x23, x23, #0x10\n" - "add x22, x22, #0x10\n" ".inst 0x658abca5 // bfcvt z5.h, p7/M, z5.s\n" + "ld1rqw { z4.s }, p0/Z, [x22]\n" ".inst 0x658abc00 // bfcvt z0.h, p7/M, z0.s\n" "uzp1 z5.h, z5.h, z5.h\n" - ".inst 0x658abc84 // bfcvt z4.h, p7/M, z4.s\n" + "ld1h { z3.h }, p7/Z, [x12]\n" "uzp1 z0.h, z0.h, z0.h\n" + ".inst 0x658abc84 // bfcvt z4.h, p7/M, z4.s\n" + "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" + "ld1h { z1.h }, p7/Z, [x11]\n" "trn1 z5.d, z5.d, z0.d\n" "uzp1 z4.h, z4.h, z4.h\n" + "ld1h { z0.h }, p7/Z, [x11, #1, MUL VL]\n" ".inst 0x6463e4a8 // bfmmla z8.s, z5.h, z3.h\n" ".inst 0x6463e494 // bfmmla z20.s, z4.h, z3.h\n" - "ld1h { z3.h }, p7/Z, [x10]\n" ".inst 0x6462e4ae // bfmmla z14.s, z5.h, z2.h\n" + "ld1h { z3.h }, p7/Z, [x10]\n" + "sub x25, x25, #0x4\n" ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" - "ld1h { z2.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" ".inst 0x6461e4a9 // bfmmla z9.s, z5.h, z1.h\n" + "ld1h { z2.h }, p7/Z, [x10, #1, MUL VL]\n" + "cmp x25, #0x4\n" ".inst 0x6461e495 // bfmmla z21.s, z4.h, z1.h\n" - ".inst 0x6466e4af // bfmmla z15.s, z5.h, z6.h\n" + ".inst 0x6460e4af // bfmmla z15.s, z5.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x9]\n" - ".inst 0x6466e49b // bfmmla z27.s, z4.h, z6.h\n" + "add x24, x24, #0x10\n" + ".inst 0x6460e49b // bfmmla z27.s, z4.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x9, #1, MUL VL]\n" ".inst 0x6463e4aa // bfmmla z10.s, z5.h, z3.h\n" - "addvl x9, x9, #2\n" + "add x23, x23, #0x10\n" ".inst 0x6463e496 // bfmmla z22.s, z4.h, z3.h\n" ".inst 0x6462e4b0 // bfmmla z16.s, z5.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x28]\n" + "add x22, x22, #0x10\n" ".inst 0x6462e49c // bfmmla z28.s, z4.h, z2.h\n" ".inst 0x6461e4ab // bfmmla z11.s, z5.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" + "addvl x12, x12, #2\n" ".inst 0x6461e497 // bfmmla z23.s, z4.h, z1.h\n" ".inst 0x6460e4b1 // bfmmla z17.s, z5.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x27]\n" + "addvl x11, x11, #2\n" ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x27, #1, MUL VL]\n" ".inst 0x6463e4ac // bfmmla z12.s, z5.h, z3.h\n" - "addvl x27, x27, #2\n" + "addvl x10, x10, #2\n" ".inst 0x6463e498 // bfmmla z24.s, z4.h, z3.h\n" ".inst 0x6462e4b2 // bfmmla z18.s, z5.h, z2.h\n" + "addvl x9, x9, #2\n" + "addvl x28, x28, #2\n" ".inst 0x6462e49e // bfmmla z30.s, z4.h, z2.h\n" ".inst 0x6461e4ad // bfmmla z13.s, z5.h, z1.h\n" + "addvl x27, x27, #2\n" ".inst 0x6461e499 // bfmmla z25.s, z4.h, z1.h\n" ".inst 0x6460e4b3 // bfmmla z19.s, z5.h, z0.h\n" ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" "bgt 38b\n" "39:" // Height 3: Multiply loop: Single iteration only "whilelt p0.s, XZR, x25\n" - "ld1h { z3.h }, p7/Z, [x12]\n" - "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" - "addvl x12, x12, #2\n" - "ld1h { z6.h }, p7/Z, [x11]\n" - "ld1h { z1.h }, p7/Z, [x11, #1, MUL VL]\n" - "addvl x11, x11, #2\n" "ld1rqw { z5.s }, p0/Z, [x24]\n" "ld1rqw { z0.s }, p0/Z, [x23]\n" - "ld1rqw { z4.s }, p0/Z, [x22]\n" ".inst 0x658abca5 // bfcvt z5.h, p7/M, z5.s\n" + "ld1rqw { z4.s }, p0/Z, [x22]\n" ".inst 0x658abc00 // bfcvt z0.h, p7/M, z0.s\n" "uzp1 z5.h, z5.h, z5.h\n" + "ld1h { z3.h }, p7/Z, [x12]\n" "uzp1 z0.h, z0.h, z0.h\n" ".inst 0x658abc84 // bfcvt z4.h, p7/M, z4.s\n" + "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" + "ld1h { z1.h }, p7/Z, [x11]\n" "trn1 z5.d, z5.d, z0.d\n" "uzp1 z4.h, z4.h, z4.h\n" + "ld1h { z0.h }, p7/Z, [x11, #1, MUL VL]\n" ".inst 0x6463e4a8 // bfmmla z8.s, z5.h, z3.h\n" - ".inst 0x6462e4ae // bfmmla z14.s, z5.h, z2.h\n" - ".inst 0x6466e4a9 // bfmmla z9.s, z5.h, z6.h\n" - ".inst 0x6461e4af // bfmmla z15.s, z5.h, z1.h\n" ".inst 0x6463e494 // bfmmla z20.s, z4.h, z3.h\n" + ".inst 0x6462e4ae // bfmmla z14.s, z5.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x10]\n" + "addvl x12, x12, #2\n" ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" + ".inst 0x6461e4a9 // bfmmla z9.s, z5.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x10, #1, MUL VL]\n" - ".inst 0x6466e495 // bfmmla z21.s, z4.h, z6.h\n" - ".inst 0x6461e49b // bfmmla z27.s, z4.h, z1.h\n" + "addvl x11, x11, #2\n" + ".inst 0x6461e495 // bfmmla z21.s, z4.h, z1.h\n" + ".inst 0x6460e4af // bfmmla z15.s, z5.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x9]\n" - "ld1h { z0.h }, p7/Z, [x9, #1, MUL VL]\n" "addvl x10, x10, #2\n" - "addvl x9, x9, #2\n" + ".inst 0x6460e49b // bfmmla z27.s, z4.h, z0.h\n" + "ld1h { z0.h }, p7/Z, [x9, #1, MUL VL]\n" ".inst 0x6463e4aa // bfmmla z10.s, z5.h, z3.h\n" + "addvl x9, x9, #2\n" ".inst 0x6463e496 // bfmmla z22.s, z4.h, z3.h\n" ".inst 0x6462e4b0 // bfmmla z16.s, z5.h, z2.h\n" - ".inst 0x6462e49c // bfmmla z28.s, z4.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x28]\n" - "ld1h { z2.h }, p7/Z, [x28, #1, MUL VL]\n" + ".inst 0x6462e49c // bfmmla z28.s, z4.h, z2.h\n" ".inst 0x6461e4ab // bfmmla z11.s, z5.h, z1.h\n" - ".inst 0x6461e497 // bfmmla z23.s, z4.h, z1.h\n" - "ld1h { z1.h }, p7/Z, [x27]\n" + "ld1h { z2.h }, p7/Z, [x28, #1, MUL VL]\n" "addvl x28, x28, #2\n" + ".inst 0x6461e497 // bfmmla z23.s, z4.h, z1.h\n" ".inst 0x6460e4b1 // bfmmla z17.s, z5.h, z0.h\n" + "ld1h { z1.h }, p7/Z, [x27]\n" ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x27, #1, MUL VL]\n" - "addvl x27, x27, #2\n" ".inst 0x6463e4ac // bfmmla z12.s, z5.h, z3.h\n" + "addvl x27, x27, #2\n" ".inst 0x6463e498 // bfmmla z24.s, z4.h, z3.h\n" ".inst 0x6462e4b2 // bfmmla z18.s, z5.h, z2.h\n" ".inst 0x6462e49e // bfmmla z30.s, z4.h, z2.h\n" @@ -926,16 +924,16 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "cmp x26, x20\n" "bne 35b\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x23, x13, x20, LSL #2\n" "uzp1 z4.d, z8.d, z14.d\n" "uzp2 z8.d, z8.d, z14.d\n" "uzp1 z14.d, z9.d, z15.d\n" "uzp2 z9.d, z9.d, z15.d\n" + "add x22, x23, x20, LSL #2\n" "uzp1 z15.d, z10.d, z16.d\n" "uzp2 z10.d, z10.d, z16.d\n" - "add x24, x13, x20, LSL #2\n" "uzp1 z16.d, z11.d, z17.d\n" "uzp2 z11.d, z11.d, z17.d\n" - "add x23, x24, x20, LSL #2\n" "uzp1 z17.d, z12.d, z18.d\n" "uzp2 z12.d, z12.d, z18.d\n" "uzp1 z18.d, z13.d, z19.d\n" @@ -947,9 +945,9 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "uzp1 z24.d, z24.d, z30.d\n" "uzp1 z25.d, z25.d, z31.d\n" "tbz %x[flags], #1, 41f\n" - "add x21, %x[args_ptr], %[offset_max]\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z0.s }, p7/Z, [x20]\n" "add x20, %x[args_ptr], %[offset_min]\n" - "ld1rw { z0.s }, p7/Z, [x21]\n" "ld1rw { z19.s }, p7/Z, [x20]\n" "fmin z4.s, p7/M, z4.s, z0.s\n" "fmin z14.s, p7/M, z14.s, z0.s\n" @@ -995,18 +993,18 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "st1w { z17.s }, p2, [x13, #4, MUL VL]\n" "st1w { z18.s }, p1, [x13, #5, MUL VL]\n" "addvl x13, x13, #6\n" - "st1w { z8.s }, p6, [x24]\n" - "st1w { z9.s }, p5, [x24, #1, MUL VL]\n" - "st1w { z10.s }, p4, [x24, #2, MUL VL]\n" - "st1w { z11.s }, p3, [x24, #3, MUL VL]\n" - "st1w { z12.s }, p2, [x24, #4, MUL VL]\n" - "st1w { z13.s }, p1, [x24, #5, MUL VL]\n" - "st1w { z20.s }, p6, [x23]\n" - "st1w { z21.s }, p5, [x23, #1, MUL VL]\n" - "st1w { z22.s }, p4, [x23, #2, MUL VL]\n" - "st1w { z23.s }, p3, [x23, #3, MUL VL]\n" - "st1w { z24.s }, p2, [x23, #4, MUL VL]\n" - "st1w { z25.s }, p1, [x23, #5, MUL VL]\n" + "st1w { z8.s }, p6, [x23]\n" + "st1w { z9.s }, p5, [x23, #1, MUL VL]\n" + "st1w { z10.s }, p4, [x23, #2, MUL VL]\n" + "st1w { z11.s }, p3, [x23, #3, MUL VL]\n" + "st1w { z12.s }, p2, [x23, #4, MUL VL]\n" + "st1w { z13.s }, p1, [x23, #5, MUL VL]\n" + "st1w { z20.s }, p6, [x22]\n" + "st1w { z21.s }, p5, [x22, #1, MUL VL]\n" + "st1w { z22.s }, p4, [x22, #2, MUL VL]\n" + "st1w { z23.s }, p3, [x22, #3, MUL VL]\n" + "st1w { z24.s }, p2, [x22, #4, MUL VL]\n" + "st1w { z25.s }, p1, [x22, #5, MUL VL]\n" "42:" // Height 3: Writeback done "decw x14, ALL, MUL #6\n" "cmp x14, XZR\n" @@ -1014,21 +1012,20 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "b 58f\n" "43:" // Height 4 "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" - "ldr x15, [%x[args_ptr], %[offsetof_bias]]\n" - "mov x21, #0x10\n" "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x21, #0x10\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" - "ldr x13, [%x[args_ptr], %[offsetof_output_ptr]]\n" - "madd x21, x20, x21, x13\n" - "str x21, [%x[args_ptr], %[offsetof_output_ptr]]\n" + "mov x15, %x[bias]\n" + "mov x13, %x[output_ptr]\n" + "madd %x[output_ptr], x20, x21, %x[output_ptr]\n" "44:" // Height 4: Column loop "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" - "cntw x21, ALL, MUL #5\n" "add x11, x12, x20, LSL #1\n" "add x10, x11, x20, LSL #1\n" "add x9, x10, x20, LSL #1\n" + "cntw x21, ALL, MUL #5\n" "add x28, x9, x20, LSL #1\n" "add x27, x28, x20, LSL #1\n" "add x20, x27, x20, LSL #1\n" @@ -1036,20 +1033,20 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" "bgt 45f\n" "decw x21\n" - "mov x27, x12\n" "cmp x14, x21\n" + "mov x27, x12\n" "bgt 45f\n" "decw x21\n" - "mov x28, x12\n" "cmp x14, x21\n" + "mov x28, x12\n" "bgt 45f\n" "decw x21\n" - "mov x9, x12\n" "cmp x14, x21\n" + "mov x9, x12\n" "bgt 45f\n" "decw x21\n" - "mov x10, x12\n" "cmp x14, x21\n" + "mov x10, x12\n" "bgt 45f\n" "mov x11, x12\n" "45:" // Height 4: B setup done @@ -1068,19 +1065,19 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "cbz x15, 46f\n" "ld1w { z8.s }, p7/Z, [x15]\n" "ld1w { z9.s }, p7/Z, [x15, #1, MUL VL]\n" - "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" - "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" - "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" - "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" - "addvl x15, x15, #6\n" "zip2 z14.d, z8.d, z8.d\n" "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p7/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p7/Z, [x15, #3, MUL VL]\n" "zip2 z15.d, z9.d, z9.d\n" "zip1 z9.d, z9.d, z9.d\n" + "ld1w { z12.s }, p7/Z, [x15, #4, MUL VL]\n" + "ld1w { z13.s }, p7/Z, [x15, #5, MUL VL]\n" "zip2 z16.d, z10.d, z10.d\n" "zip1 z10.d, z10.d, z10.d\n" "zip2 z17.d, z11.d, z11.d\n" "zip1 z11.d, z11.d, z11.d\n" + "addvl x15, x15, #6\n" "zip2 z18.d, z12.d, z12.d\n" "zip1 z12.d, z12.d, z12.d\n" "zip2 z19.d, z13.d, z13.d\n" @@ -1101,51 +1098,51 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "46:" // Height 4: no bias "tbz %x[flags], #0, 47f\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" - "ld1w { z22.s }, p6/Z, [x13]\n" - "ld1w { z24.s }, p5/Z, [x13, #1, MUL VL]\n" - "ld1w { z26.s }, p4/Z, [x13, #2, MUL VL]\n" - "ld1w { z27.s }, p3/Z, [x13, #3, MUL VL]\n" - "ld1w { z29.s }, p2/Z, [x13, #4, MUL VL]\n" "add x22, x13, x20, LSL #2\n" "add x21, x22, x20, LSL #2\n" + "ld1w { z16.s }, p6/Z, [x13]\n" "add x20, x21, x20, LSL #2\n" + "ld1w { z17.s }, p5/Z, [x13, #1, MUL VL]\n" + "ld1w { z19.s }, p4/Z, [x13, #2, MUL VL]\n" + "ld1w { z22.s }, p3/Z, [x13, #3, MUL VL]\n" + "ld1w { z24.s }, p2/Z, [x13, #4, MUL VL]\n" "ld1w { z20.s }, p1/Z, [x13, #5, MUL VL]\n" "ld1w { z14.s }, p6/Z, [x22]\n" + "zip1 z8.d, z16.d, z14.d\n" + "zip2 z14.d, z16.d, z14.d\n" "ld1w { z15.s }, p5/Z, [x22, #1, MUL VL]\n" "ld1w { z16.s }, p4/Z, [x22, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z15.d\n" + "zip2 z15.d, z17.d, z15.d\n" "ld1w { z17.s }, p3/Z, [x22, #3, MUL VL]\n" "ld1w { z18.s }, p2/Z, [x22, #4, MUL VL]\n" + "zip1 z10.d, z19.d, z16.d\n" + "zip2 z16.d, z19.d, z16.d\n" "ld1w { z19.s }, p1/Z, [x22, #5, MUL VL]\n" "ld1w { z21.s }, p6/Z, [x21]\n" - "zip1 z8.d, z22.d, z14.d\n" - "zip2 z14.d, z22.d, z14.d\n" + "zip1 z11.d, z22.d, z17.d\n" + "zip2 z17.d, z22.d, z17.d\n" "ld1w { z22.s }, p5/Z, [x21, #1, MUL VL]\n" "ld1w { z23.s }, p4/Z, [x21, #2, MUL VL]\n" - "zip1 z9.d, z24.d, z15.d\n" - "zip2 z15.d, z24.d, z15.d\n" + "zip1 z12.d, z24.d, z18.d\n" + "zip2 z18.d, z24.d, z18.d\n" "ld1w { z24.s }, p3/Z, [x21, #3, MUL VL]\n" "ld1w { z25.s }, p2/Z, [x21, #4, MUL VL]\n" - "zip1 z10.d, z26.d, z16.d\n" - "zip2 z16.d, z26.d, z16.d\n" - "ld1w { z0.s }, p1/Z, [x21, #5, MUL VL]\n" - "ld1w { z26.s }, p6/Z, [x20]\n" - "zip1 z11.d, z27.d, z17.d\n" - "zip2 z17.d, z27.d, z17.d\n" - "ld1w { z27.s }, p5/Z, [x20, #1, MUL VL]\n" - "ld1w { z28.s }, p4/Z, [x20, #2, MUL VL]\n" - "zip1 z12.d, z29.d, z18.d\n" - "zip2 z18.d, z29.d, z18.d\n" - "ld1w { z29.s }, p3/Z, [x20, #3, MUL VL]\n" - "ld1w { z30.s }, p2/Z, [x20, #4, MUL VL]\n" "zip1 z13.d, z20.d, z19.d\n" "zip2 z19.d, z20.d, z19.d\n" - "ld1w { z31.s }, p1/Z, [x20, #5, MUL VL]\n" + "ld1w { z0.s }, p1/Z, [x21, #5, MUL VL]\n" + "ld1w { z26.s }, p6/Z, [x20]\n" "zip1 z20.d, z21.d, z26.d\n" "zip2 z26.d, z21.d, z26.d\n" + "ld1w { z27.s }, p5/Z, [x20, #1, MUL VL]\n" + "ld1w { z28.s }, p4/Z, [x20, #2, MUL VL]\n" "zip1 z21.d, z22.d, z27.d\n" "zip2 z27.d, z22.d, z27.d\n" + "ld1w { z29.s }, p3/Z, [x20, #3, MUL VL]\n" + "ld1w { z30.s }, p2/Z, [x20, #4, MUL VL]\n" "zip1 z22.d, z23.d, z28.d\n" "zip2 z28.d, z23.d, z28.d\n" + "ld1w { z31.s }, p1/Z, [x20, #5, MUL VL]\n" "zip1 z23.d, z24.d, z29.d\n" "zip2 z29.d, z24.d, z29.d\n" "zip1 z24.d, z25.d, z30.d\n" @@ -1182,8 +1179,8 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "mov x26, #0x0\n" "49:" // Height 4: String loop "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" - "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "ldr w25, [x20, x26, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" "tbz %x[flags], #3, 50f\n" "ldr x20, [%x[input_ptr], x26, LSL #0x3]\n" "add x20, x20, x21, LSL #3\n" @@ -1208,144 +1205,144 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "ble 53f\n" "52:" // Height 4: Multiply loop: Main loop head "whilelt p0.s, XZR, x25\n" - "ld1h { z3.h }, p7/Z, [x12]\n" - "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" - "sub x25, x25, #0x4\n" - "ld1h { z7.h }, p7/Z, [x11]\n" - "ld1h { z6.h }, p7/Z, [x11, #1, MUL VL]\n" - "cmp x25, #0x4\n" - "addvl x12, x12, #2\n" - "addvl x11, x11, #2\n" - "ld1rqw { z5.s }, p0/Z, [x24]\n" - "add x24, x24, #0x10\n" - "ld1rqw { z1.s }, p0/Z, [x23]\n" - "ld1rqw { z4.s }, p0/Z, [x22]\n" - "ld1rqw { z0.s }, p0/Z, [x21]\n" - "add x23, x23, #0x10\n" - "add x22, x22, #0x10\n" - "add x21, x21, #0x10\n" + "ld1rqw { z7.s }, p0/Z, [x24]\n" + "ld1rqw { z6.s }, p0/Z, [x23]\n" + ".inst 0x658abce7 // bfcvt z7.h, p7/M, z7.s\n" + "ld1rqw { z5.s }, p0/Z, [x22]\n" + "ld1rqw { z4.s }, p0/Z, [x21]\n" + ".inst 0x658abcc6 // bfcvt z6.h, p7/M, z6.s\n" ".inst 0x658abca5 // bfcvt z5.h, p7/M, z5.s\n" - ".inst 0x658abc21 // bfcvt z1.h, p7/M, z1.s\n" ".inst 0x658abc84 // bfcvt z4.h, p7/M, z4.s\n" - ".inst 0x658abc00 // bfcvt z0.h, p7/M, z0.s\n" + "uzp1 z7.h, z7.h, z7.h\n" + "ld1h { z3.h }, p7/Z, [x12]\n" + "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" + "uzp1 z6.h, z6.h, z6.h\n" "uzp1 z5.h, z5.h, z5.h\n" - "uzp1 z1.h, z1.h, z1.h\n" + "ld1h { z1.h }, p7/Z, [x11]\n" + "ld1h { z0.h }, p7/Z, [x11, #1, MUL VL]\n" "uzp1 z4.h, z4.h, z4.h\n" - "uzp1 z0.h, z0.h, z0.h\n" - "trn1 z5.d, z5.d, z1.d\n" - "trn1 z4.d, z4.d, z0.d\n" - ".inst 0x6463e4a8 // bfmmla z8.s, z5.h, z3.h\n" - ".inst 0x6463e494 // bfmmla z20.s, z4.h, z3.h\n" + "trn1 z7.d, z7.d, z6.d\n" + ".inst 0x6463e4e8 // bfmmla z8.s, z7.h, z3.h\n" + "sub x25, x25, #0x4\n" + "trn1 z5.d, z5.d, z4.d\n" + ".inst 0x6463e4b4 // bfmmla z20.s, z5.h, z3.h\n" + ".inst 0x6462e4ee // bfmmla z14.s, z7.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x10]\n" - ".inst 0x6462e4ae // bfmmla z14.s, z5.h, z2.h\n" - ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" + ".inst 0x6462e4ba // bfmmla z26.s, z5.h, z2.h\n" + ".inst 0x6461e4e9 // bfmmla z9.s, z7.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" - ".inst 0x6467e4a9 // bfmmla z9.s, z5.h, z7.h\n" - ".inst 0x6467e495 // bfmmla z21.s, z4.h, z7.h\n" - ".inst 0x6466e4af // bfmmla z15.s, z5.h, z6.h\n" + "cmp x25, #0x4\n" + ".inst 0x6461e4b5 // bfmmla z21.s, z5.h, z1.h\n" + ".inst 0x6460e4ef // bfmmla z15.s, z7.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x9]\n" - ".inst 0x6466e49b // bfmmla z27.s, z4.h, z6.h\n" + "add x24, x24, #0x10\n" + ".inst 0x6460e4bb // bfmmla z27.s, z5.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x9, #1, MUL VL]\n" - ".inst 0x6463e4aa // bfmmla z10.s, z5.h, z3.h\n" - "addvl x9, x9, #2\n" - ".inst 0x6463e496 // bfmmla z22.s, z4.h, z3.h\n" - ".inst 0x6462e4b0 // bfmmla z16.s, z5.h, z2.h\n" + ".inst 0x6463e4ea // bfmmla z10.s, z7.h, z3.h\n" + "add x23, x23, #0x10\n" + ".inst 0x6463e4b6 // bfmmla z22.s, z5.h, z3.h\n" + ".inst 0x6462e4f0 // bfmmla z16.s, z7.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x28]\n" - ".inst 0x6462e49c // bfmmla z28.s, z4.h, z2.h\n" - ".inst 0x6461e4ab // bfmmla z11.s, z5.h, z1.h\n" + "add x22, x22, #0x10\n" + ".inst 0x6462e4bc // bfmmla z28.s, z5.h, z2.h\n" + ".inst 0x6461e4eb // bfmmla z11.s, z7.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x28, #1, MUL VL]\n" - "addvl x28, x28, #2\n" - ".inst 0x6461e497 // bfmmla z23.s, z4.h, z1.h\n" - ".inst 0x6460e4b1 // bfmmla z17.s, z5.h, z0.h\n" + "add x21, x21, #0x10\n" + ".inst 0x6461e4b7 // bfmmla z23.s, z5.h, z1.h\n" + ".inst 0x6460e4f1 // bfmmla z17.s, z7.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x27]\n" - ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" + "addvl x12, x12, #2\n" + ".inst 0x6460e4bd // bfmmla z29.s, z5.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x27, #1, MUL VL]\n" - ".inst 0x6463e4ac // bfmmla z12.s, z5.h, z3.h\n" + ".inst 0x6463e4ec // bfmmla z12.s, z7.h, z3.h\n" + "addvl x11, x11, #2\n" + ".inst 0x6463e4b8 // bfmmla z24.s, z5.h, z3.h\n" + ".inst 0x6462e4f2 // bfmmla z18.s, z7.h, z2.h\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + ".inst 0x6462e4be // bfmmla z30.s, z5.h, z2.h\n" + ".inst 0x6461e4ed // bfmmla z13.s, z7.h, z1.h\n" + "addvl x28, x28, #2\n" "addvl x27, x27, #2\n" - ".inst 0x6463e498 // bfmmla z24.s, z4.h, z3.h\n" - ".inst 0x6462e4b2 // bfmmla z18.s, z5.h, z2.h\n" - ".inst 0x6462e49e // bfmmla z30.s, z4.h, z2.h\n" - ".inst 0x6461e4ad // bfmmla z13.s, z5.h, z1.h\n" - ".inst 0x6461e499 // bfmmla z25.s, z4.h, z1.h\n" - ".inst 0x6460e4b3 // bfmmla z19.s, z5.h, z0.h\n" - ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" + ".inst 0x6461e4b9 // bfmmla z25.s, z5.h, z1.h\n" + ".inst 0x6460e4f3 // bfmmla z19.s, z7.h, z0.h\n" + ".inst 0x6460e4bf // bfmmla z31.s, z5.h, z0.h\n" "bgt 52b\n" "53:" // Height 4: Multiply loop: Single iteration only "whilelt p0.s, XZR, x25\n" - "ld1h { z3.h }, p7/Z, [x12]\n" - "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" - "addvl x12, x12, #2\n" - "ld1h { z7.h }, p7/Z, [x11]\n" - "ld1h { z6.h }, p7/Z, [x11, #1, MUL VL]\n" - "addvl x11, x11, #2\n" - "ld1rqw { z5.s }, p0/Z, [x24]\n" - "ld1rqw { z1.s }, p0/Z, [x23]\n" - "ld1rqw { z4.s }, p0/Z, [x22]\n" - "ld1rqw { z0.s }, p0/Z, [x21]\n" + "ld1rqw { z7.s }, p0/Z, [x24]\n" + "ld1rqw { z6.s }, p0/Z, [x23]\n" + ".inst 0x658abce7 // bfcvt z7.h, p7/M, z7.s\n" + "ld1rqw { z5.s }, p0/Z, [x22]\n" + "ld1rqw { z4.s }, p0/Z, [x21]\n" + ".inst 0x658abcc6 // bfcvt z6.h, p7/M, z6.s\n" ".inst 0x658abca5 // bfcvt z5.h, p7/M, z5.s\n" - ".inst 0x658abc21 // bfcvt z1.h, p7/M, z1.s\n" ".inst 0x658abc84 // bfcvt z4.h, p7/M, z4.s\n" - ".inst 0x658abc00 // bfcvt z0.h, p7/M, z0.s\n" + "uzp1 z7.h, z7.h, z7.h\n" + "ld1h { z3.h }, p7/Z, [x12]\n" + "ld1h { z2.h }, p7/Z, [x12, #1, MUL VL]\n" + "uzp1 z6.h, z6.h, z6.h\n" "uzp1 z5.h, z5.h, z5.h\n" - "uzp1 z1.h, z1.h, z1.h\n" + "ld1h { z1.h }, p7/Z, [x11]\n" + "ld1h { z0.h }, p7/Z, [x11, #1, MUL VL]\n" "uzp1 z4.h, z4.h, z4.h\n" - "uzp1 z0.h, z0.h, z0.h\n" - "trn1 z5.d, z5.d, z1.d\n" - "trn1 z4.d, z4.d, z0.d\n" - ".inst 0x6463e4a8 // bfmmla z8.s, z5.h, z3.h\n" - ".inst 0x6463e494 // bfmmla z20.s, z4.h, z3.h\n" + "trn1 z7.d, z7.d, z6.d\n" + ".inst 0x6463e4e8 // bfmmla z8.s, z7.h, z3.h\n" + "addvl x12, x12, #2\n" + "trn1 z5.d, z5.d, z4.d\n" + ".inst 0x6463e4b4 // bfmmla z20.s, z5.h, z3.h\n" + ".inst 0x6462e4ee // bfmmla z14.s, z7.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x10]\n" - ".inst 0x6462e4ae // bfmmla z14.s, z5.h, z2.h\n" - ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" + ".inst 0x6462e4ba // bfmmla z26.s, z5.h, z2.h\n" + ".inst 0x6461e4e9 // bfmmla z9.s, z7.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x10, #1, MUL VL]\n" - "addvl x10, x10, #2\n" - ".inst 0x6467e4a9 // bfmmla z9.s, z5.h, z7.h\n" - ".inst 0x6467e495 // bfmmla z21.s, z4.h, z7.h\n" - ".inst 0x6466e4af // bfmmla z15.s, z5.h, z6.h\n" + "addvl x11, x11, #2\n" + ".inst 0x6461e4b5 // bfmmla z21.s, z5.h, z1.h\n" + ".inst 0x6460e4ef // bfmmla z15.s, z7.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x9]\n" - ".inst 0x6466e49b // bfmmla z27.s, z4.h, z6.h\n" + "addvl x10, x10, #2\n" + ".inst 0x6460e4bb // bfmmla z27.s, z5.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x9, #1, MUL VL]\n" - ".inst 0x6463e4aa // bfmmla z10.s, z5.h, z3.h\n" + ".inst 0x6463e4ea // bfmmla z10.s, z7.h, z3.h\n" "addvl x9, x9, #2\n" - ".inst 0x6463e496 // bfmmla z22.s, z4.h, z3.h\n" - ".inst 0x6462e4b0 // bfmmla z16.s, z5.h, z2.h\n" + ".inst 0x6463e4b6 // bfmmla z22.s, z5.h, z3.h\n" + ".inst 0x6462e4f0 // bfmmla z16.s, z7.h, z2.h\n" "ld1h { z3.h }, p7/Z, [x28]\n" - ".inst 0x6462e49c // bfmmla z28.s, z4.h, z2.h\n" - ".inst 0x6461e4ab // bfmmla z11.s, z5.h, z1.h\n" + ".inst 0x6462e4bc // bfmmla z28.s, z5.h, z2.h\n" + ".inst 0x6461e4eb // bfmmla z11.s, z7.h, z1.h\n" "ld1h { z2.h }, p7/Z, [x28, #1, MUL VL]\n" "addvl x28, x28, #2\n" - ".inst 0x6461e497 // bfmmla z23.s, z4.h, z1.h\n" - ".inst 0x6460e4b1 // bfmmla z17.s, z5.h, z0.h\n" + ".inst 0x6461e4b7 // bfmmla z23.s, z5.h, z1.h\n" + ".inst 0x6460e4f1 // bfmmla z17.s, z7.h, z0.h\n" "ld1h { z1.h }, p7/Z, [x27]\n" - ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" + ".inst 0x6460e4bd // bfmmla z29.s, z5.h, z0.h\n" "ld1h { z0.h }, p7/Z, [x27, #1, MUL VL]\n" - ".inst 0x6463e4ac // bfmmla z12.s, z5.h, z3.h\n" + ".inst 0x6463e4ec // bfmmla z12.s, z7.h, z3.h\n" "addvl x27, x27, #2\n" - ".inst 0x6463e498 // bfmmla z24.s, z4.h, z3.h\n" - ".inst 0x6462e4b2 // bfmmla z18.s, z5.h, z2.h\n" - ".inst 0x6462e49e // bfmmla z30.s, z4.h, z2.h\n" - ".inst 0x6461e4ad // bfmmla z13.s, z5.h, z1.h\n" - ".inst 0x6461e499 // bfmmla z25.s, z4.h, z1.h\n" - ".inst 0x6460e4b3 // bfmmla z19.s, z5.h, z0.h\n" - ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" + ".inst 0x6463e4b8 // bfmmla z24.s, z5.h, z3.h\n" + ".inst 0x6462e4f2 // bfmmla z18.s, z7.h, z2.h\n" + ".inst 0x6462e4be // bfmmla z30.s, z5.h, z2.h\n" + ".inst 0x6461e4ed // bfmmla z13.s, z7.h, z1.h\n" + ".inst 0x6461e4b9 // bfmmla z25.s, z5.h, z1.h\n" + ".inst 0x6460e4f3 // bfmmla z19.s, z7.h, z0.h\n" + ".inst 0x6460e4bf // bfmmla z31.s, z5.h, z0.h\n" "54:" // Height 4: Multiply loop: multiply skip "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" "add x26, x26, #0x1\n" "cmp x26, x20\n" "bne 49b\n" "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x23, x13, x20, LSL #2\n" + "add x22, x23, x20, LSL #2\n" "uzp1 z4.d, z8.d, z14.d\n" "uzp2 z8.d, z8.d, z14.d\n" "uzp1 z14.d, z9.d, z15.d\n" + "add x21, x22, x20, LSL #2\n" "uzp2 z9.d, z9.d, z15.d\n" "uzp1 z15.d, z10.d, z16.d\n" "uzp2 z10.d, z10.d, z16.d\n" - "add x24, x13, x20, LSL #2\n" - "add x23, x24, x20, LSL #2\n" "uzp1 z16.d, z11.d, z17.d\n" "uzp2 z11.d, z11.d, z17.d\n" - "add x22, x23, x20, LSL #2\n" "uzp1 z17.d, z12.d, z18.d\n" "uzp2 z12.d, z12.d, z18.d\n" "uzp1 z18.d, z13.d, z19.d\n" @@ -1363,9 +1360,9 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "uzp1 z30.d, z25.d, z31.d\n" "uzp2 z25.d, z25.d, z31.d\n" "tbz %x[flags], #1, 55f\n" - "add x21, %x[args_ptr], %[offset_max]\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z1.s }, p7/Z, [x20]\n" "add x20, %x[args_ptr], %[offset_min]\n" - "ld1rw { z1.s }, p7/Z, [x21]\n" "ld1rw { z0.s }, p7/Z, [x20]\n" "fmin z4.s, p7/M, z4.s, z1.s\n" "fmin z14.s, p7/M, z14.s, z1.s\n" @@ -1423,24 +1420,24 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "st1w { z17.s }, p2, [x13, #4, MUL VL]\n" "st1w { z18.s }, p1, [x13, #5, MUL VL]\n" "addvl x13, x13, #6\n" - "st1w { z8.s }, p6, [x24]\n" - "st1w { z9.s }, p5, [x24, #1, MUL VL]\n" - "st1w { z10.s }, p4, [x24, #2, MUL VL]\n" - "st1w { z11.s }, p3, [x24, #3, MUL VL]\n" - "st1w { z12.s }, p2, [x24, #4, MUL VL]\n" - "st1w { z13.s }, p1, [x24, #5, MUL VL]\n" - "st1w { z19.s }, p6, [x23]\n" - "st1w { z26.s }, p5, [x23, #1, MUL VL]\n" - "st1w { z27.s }, p4, [x23, #2, MUL VL]\n" - "st1w { z28.s }, p3, [x23, #3, MUL VL]\n" - "st1w { z29.s }, p2, [x23, #4, MUL VL]\n" - "st1w { z30.s }, p1, [x23, #5, MUL VL]\n" - "st1w { z20.s }, p6, [x22]\n" - "st1w { z21.s }, p5, [x22, #1, MUL VL]\n" - "st1w { z22.s }, p4, [x22, #2, MUL VL]\n" - "st1w { z23.s }, p3, [x22, #3, MUL VL]\n" - "st1w { z24.s }, p2, [x22, #4, MUL VL]\n" - "st1w { z25.s }, p1, [x22, #5, MUL VL]\n" + "st1w { z8.s }, p6, [x23]\n" + "st1w { z9.s }, p5, [x23, #1, MUL VL]\n" + "st1w { z10.s }, p4, [x23, #2, MUL VL]\n" + "st1w { z11.s }, p3, [x23, #3, MUL VL]\n" + "st1w { z12.s }, p2, [x23, #4, MUL VL]\n" + "st1w { z13.s }, p1, [x23, #5, MUL VL]\n" + "st1w { z19.s }, p6, [x22]\n" + "st1w { z26.s }, p5, [x22, #1, MUL VL]\n" + "st1w { z27.s }, p4, [x22, #2, MUL VL]\n" + "st1w { z28.s }, p3, [x22, #3, MUL VL]\n" + "st1w { z29.s }, p2, [x22, #4, MUL VL]\n" + "st1w { z30.s }, p1, [x22, #5, MUL VL]\n" + "st1w { z20.s }, p6, [x21]\n" + "st1w { z21.s }, p5, [x21, #1, MUL VL]\n" + "st1w { z22.s }, p4, [x21, #2, MUL VL]\n" + "st1w { z23.s }, p3, [x21, #3, MUL VL]\n" + "st1w { z24.s }, p2, [x21, #4, MUL VL]\n" + "st1w { z25.s }, p1, [x21, #5, MUL VL]\n" "56:" // Height 4: Writeback done "decw x14, ALL, MUL #6\n" "cmp x14, XZR\n" @@ -1457,8 +1454,8 @@ void sve_ffhybrid_fp32bf16fp32_mmla_4x6VL ( "madd %x[input_ptr], x20, x21, %x[input_ptr]\n" "b 1b\n" "58:" // Exit - : [M] "+&r" (M), [input_ptr] "+&r" (input_ptr) - : [args_ptr] "r" (&ka), [flags] "r" (flags), [offset_max] "I" (offsetof(KernelArgs, maxval)), [offset_min] "I" (offsetof(KernelArgs, minval)), [offsetof_B_ptr] "I" (offsetof(KernelArgs, B_ptr)), [offsetof_B_stride] "I" (offsetof(KernelArgs, B_stride)), [offsetof_N] "I" (offsetof(KernelArgs, N)), [offsetof_bias] "I" (offsetof(KernelArgs, bias)), [offsetof_cur_B_ptr] "I" (offsetof(KernelArgs, cur_B_ptr)), [offsetof_input_initial_col] "I" (offsetof(KernelArgs, input_initial_col)), [offsetof_input_offset] "I" (offsetof(KernelArgs, input_offset)), [offsetof_num_strings] "I" (offsetof(KernelArgs, num_strings)), [offsetof_output_offset] "I" (offsetof(KernelArgs, output_offset)), [offsetof_output_ptr] "I" (offsetof(KernelArgs, output_ptr)), [offsetof_string_lengths] "I" (offsetof(KernelArgs, string_lengths)) + : [M] "+&r" (M), [input_ptr] "+&r" (input_ptr), [output_ptr] "+&r" (output_ptr) + : [args_ptr] "r" (&ka), [bias] "r" (bias), [flags] "r" (flags), [offset_max] "I" (offsetof(KernelArgs, maxval)), [offset_min] "I" (offsetof(KernelArgs, minval)), [offsetof_B_ptr] "I" (offsetof(KernelArgs, B_ptr)), [offsetof_B_stride] "I" (offsetof(KernelArgs, B_stride)), [offsetof_N] "I" (offsetof(KernelArgs, N)), [offsetof_cur_B_ptr] "I" (offsetof(KernelArgs, cur_B_ptr)), [offsetof_input_initial_col] "I" (offsetof(KernelArgs, input_initial_col)), [offsetof_input_offset] "I" (offsetof(KernelArgs, input_offset)), [offsetof_num_strings] "I" (offsetof(KernelArgs, num_strings)), [offsetof_output_offset] "I" (offsetof(KernelArgs, output_offset)), [offsetof_string_lengths] "I" (offsetof(KernelArgs, string_lengths)) : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31" ); } |