diff options
author | Michael Tyler <michael.tyler@arm.com> | 2022-12-15 12:39:29 +0000 |
---|---|---|
committer | michael.tyler <michael.tyler@arm.com> | 2023-01-16 09:31:00 +0000 |
commit | ba209750abc1ac7e42bab9fef5db284384d70fb3 (patch) | |
tree | 1065f242db9a9a5e48bd4a9f2fd68aef1924827a /src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp | |
parent | 8094f9dd5307c55f545b2cb41ec80a739a9b4d6f (diff) | |
download | ComputeLibrary-ba209750abc1ac7e42bab9fef5db284384d70fb3.tar.gz |
Update CPU kernels to remove x19
Resolves: COMPMID-5805
Signed-off-by: Michael Tyler <michael.tyler@arm.com>
Change-Id: I250f64531e209625e4ff176dd5a552c1c34bc484
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8909
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp | 114 |
1 files changed, 55 insertions, 59 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp b/src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp index 0235e91bfe..cba29bc572 100644 --- a/src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp +++ b/src/core/NEON/kernels/arm_gemm/kernels/a64_interleaved_bf16fp32_mmla_8x12/a510.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -10,16 +10,16 @@ * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ #ifdef __aarch64__ @@ -33,34 +33,33 @@ void a64_interleaved_bf16fp32_mmla_8x12_a510( float *Cpanel, int ablocks, int bblocks, int K) { struct KernelArgs { - size_t bblocks = {}; size_t K = {}; const bfloat16 *Bpanel = {}; + size_t bblocks = {}; } ka; - ka.bblocks = bblocks; ka.K = (K/4) - 1; ka.Bpanel = Bpanel; + ka.bblocks = bblocks; __asm__ __volatile__( "1:" // Height loop - "ldr x22, [%x[args_ptr], %[offsetof_bblocks]]\n" + "ldr x23, [%x[args_ptr], %[offsetof_bblocks]]\n" + "ldr x22, [%x[args_ptr], %[offsetof_Bpanel]]\n" "mov x21, %x[Apanel]\n" - "ldr x20, [%x[args_ptr], %[offsetof_Bpanel]]\n" "2:" // Width loop + "ldp q4, q5, [x22], #0x20\n" "mov %x[Apanel], x21\n" - "ldr x19, [%x[args_ptr], %[offsetof_K]]\n" "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" - "ld1 { v4.8h }, [x20], #0x10\n" "ld1 { v1.8h }, [%x[Apanel]], #0x10\n" - "cmp x19, #0x2\n" "movi v8.16b, #0x0\n" + "ld1 { v2.8h }, [%x[Apanel]], #0x10\n" + "ldr x20, [%x[args_ptr], %[offsetof_K]]\n" + "cmp x20, #0x2\n" "movi v9.16b, #0x0\n" - "ld1 { v5.8h }, [x20], #0x10\n" "movi v10.16b, #0x0\n" "movi v11.16b, #0x0\n" - "ld1 { v2.8h }, [%x[Apanel]], #0x10\n" "movi v12.16b, #0x0\n" "movi v13.16b, #0x0\n" "movi v14.16b, #0x0\n" @@ -85,65 +84,63 @@ void a64_interleaved_bf16fp32_mmla_8x12_a510( "3:" // main loop head "ld1 { v3.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e44ec08 // bfmmla v8.4s, v0.8h, v4.8h\n" - ".inst 0x6e44ec2e // bfmmla v14.4s, v1.8h, v4.8h\n" - "ldp q6, q7, [x20], #0x20\n" ".inst 0x6e45ec0b // bfmmla v11.4s, v0.8h, v5.8h\n" + "ldp q6, q7, [x22], #0x20\n" + ".inst 0x6e44ec2e // bfmmla v14.4s, v1.8h, v4.8h\n" ".inst 0x6e45ec31 // bfmmla v17.4s, v1.8h, v5.8h\n" ".inst 0x6e44ec54 // bfmmla v20.4s, v2.8h, v4.8h\n" - "sub x19, x19, #0x2\n" + "sub x20, x20, #0x2\n" ".inst 0x6e45ec57 // bfmmla v23.4s, v2.8h, v5.8h\n" ".inst 0x6e44ec7a // bfmmla v26.4s, v3.8h, v4.8h\n" - "cmp x19, #0x2\n" + "cmp x20, #0x2\n" ".inst 0x6e45ec7d // bfmmla v29.4s, v3.8h, v5.8h\n" - "ldp q4, q5, [x20], #0x20\n" + "ldp q4, q5, [x22], #0x20\n" ".inst 0x6e46ec09 // bfmmla v9.4s, v0.8h, v6.8h\n" ".inst 0x6e47ec0c // bfmmla v12.4s, v0.8h, v7.8h\n" - ".inst 0x6e44ec0a // bfmmla v10.4s, v0.8h, v4.8h\n" - ".inst 0x6e45ec0d // bfmmla v13.4s, v0.8h, v5.8h\n" - "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e46ec2f // bfmmla v15.4s, v1.8h, v6.8h\n" + ".inst 0x6e47ec32 // bfmmla v18.4s, v1.8h, v7.8h\n" ".inst 0x6e46ec55 // bfmmla v21.4s, v2.8h, v6.8h\n" + ".inst 0x6e47ec58 // bfmmla v24.4s, v2.8h, v7.8h\n" ".inst 0x6e46ec7b // bfmmla v27.4s, v3.8h, v6.8h\n" - ".inst 0x6e47ec32 // bfmmla v18.4s, v1.8h, v7.8h\n" - "ld1 { v6.8h }, [x20], #0x10\n" + ".inst 0x6e47ec7e // bfmmla v30.4s, v3.8h, v7.8h\n" + "ldp q6, q7, [x22], #0x20\n" + ".inst 0x6e44ec0a // bfmmla v10.4s, v0.8h, v4.8h\n" + ".inst 0x6e45ec0d // bfmmla v13.4s, v0.8h, v5.8h\n" + "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e44ec30 // bfmmla v16.4s, v1.8h, v4.8h\n" ".inst 0x6e45ec33 // bfmmla v19.4s, v1.8h, v5.8h\n" "ld1 { v1.8h }, [%x[Apanel]], #0x10\n" - ".inst 0x6e47ec58 // bfmmla v24.4s, v2.8h, v7.8h\n" - ".inst 0x6e47ec7e // bfmmla v30.4s, v3.8h, v7.8h\n" - "ld1 { v7.8h }, [x20], #0x10\n" ".inst 0x6e44ec56 // bfmmla v22.4s, v2.8h, v4.8h\n" ".inst 0x6e45ec59 // bfmmla v25.4s, v2.8h, v5.8h\n" "ld1 { v2.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e44ec7c // bfmmla v28.4s, v3.8h, v4.8h\n" ".inst 0x6e45ec7f // bfmmla v31.4s, v3.8h, v5.8h\n" "ld1 { v3.8h }, [%x[Apanel]], #0x10\n" - "ldp q4, q5, [x20], #0x20\n" ".inst 0x6e46ec08 // bfmmla v8.4s, v0.8h, v6.8h\n" - ".inst 0x6e46ec2e // bfmmla v14.4s, v1.8h, v6.8h\n" + "ldp q4, q5, [x22], #0x20\n" ".inst 0x6e47ec0b // bfmmla v11.4s, v0.8h, v7.8h\n" + ".inst 0x6e46ec2e // bfmmla v14.4s, v1.8h, v6.8h\n" ".inst 0x6e47ec31 // bfmmla v17.4s, v1.8h, v7.8h\n" ".inst 0x6e46ec54 // bfmmla v20.4s, v2.8h, v6.8h\n" ".inst 0x6e47ec57 // bfmmla v23.4s, v2.8h, v7.8h\n" ".inst 0x6e46ec7a // bfmmla v26.4s, v3.8h, v6.8h\n" ".inst 0x6e47ec7d // bfmmla v29.4s, v3.8h, v7.8h\n" - "ldp q6, q7, [x20], #0x20\n" + "ldp q6, q7, [x22], #0x20\n" ".inst 0x6e44ec09 // bfmmla v9.4s, v0.8h, v4.8h\n" ".inst 0x6e45ec0c // bfmmla v12.4s, v0.8h, v5.8h\n" - ".inst 0x6e46ec0a // bfmmla v10.4s, v0.8h, v6.8h\n" - ".inst 0x6e47ec0d // bfmmla v13.4s, v0.8h, v7.8h\n" - "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e44ec2f // bfmmla v15.4s, v1.8h, v4.8h\n" + ".inst 0x6e45ec32 // bfmmla v18.4s, v1.8h, v5.8h\n" ".inst 0x6e44ec55 // bfmmla v21.4s, v2.8h, v4.8h\n" + ".inst 0x6e45ec58 // bfmmla v24.4s, v2.8h, v5.8h\n" ".inst 0x6e44ec7b // bfmmla v27.4s, v3.8h, v4.8h\n" - ".inst 0x6e45ec32 // bfmmla v18.4s, v1.8h, v5.8h\n" - "ld1 { v4.8h }, [x20], #0x10\n" + ".inst 0x6e45ec7e // bfmmla v30.4s, v3.8h, v5.8h\n" + "ldp q4, q5, [x22], #0x20\n" + ".inst 0x6e46ec0a // bfmmla v10.4s, v0.8h, v6.8h\n" + ".inst 0x6e47ec0d // bfmmla v13.4s, v0.8h, v7.8h\n" + "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e46ec30 // bfmmla v16.4s, v1.8h, v6.8h\n" ".inst 0x6e47ec33 // bfmmla v19.4s, v1.8h, v7.8h\n" "ld1 { v1.8h }, [%x[Apanel]], #0x10\n" - ".inst 0x6e45ec58 // bfmmla v24.4s, v2.8h, v5.8h\n" - ".inst 0x6e45ec7e // bfmmla v30.4s, v3.8h, v5.8h\n" - "ld1 { v5.8h }, [x20], #0x10\n" ".inst 0x6e46ec56 // bfmmla v22.4s, v2.8h, v6.8h\n" ".inst 0x6e47ec59 // bfmmla v25.4s, v2.8h, v7.8h\n" "ld1 { v2.8h }, [%x[Apanel]], #0x10\n" @@ -153,66 +150,65 @@ void a64_interleaved_bf16fp32_mmla_8x12_a510( "4:" // main loop skip "ld1 { v3.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e44ec08 // bfmmla v8.4s, v0.8h, v4.8h\n" - ".inst 0x6e44ec2e // bfmmla v14.4s, v1.8h, v4.8h\n" - "ldp q6, q7, [x20], #0x20\n" ".inst 0x6e45ec0b // bfmmla v11.4s, v0.8h, v5.8h\n" + "ldp q6, q7, [x22], #0x20\n" + ".inst 0x6e44ec2e // bfmmla v14.4s, v1.8h, v4.8h\n" ".inst 0x6e45ec31 // bfmmla v17.4s, v1.8h, v5.8h\n" ".inst 0x6e44ec54 // bfmmla v20.4s, v2.8h, v4.8h\n" ".inst 0x6e45ec57 // bfmmla v23.4s, v2.8h, v5.8h\n" ".inst 0x6e44ec7a // bfmmla v26.4s, v3.8h, v4.8h\n" ".inst 0x6e45ec7d // bfmmla v29.4s, v3.8h, v5.8h\n" - "ldp q4, q5, [x20], #0x20\n" + "ldp q4, q5, [x22], #0x20\n" ".inst 0x6e46ec09 // bfmmla v9.4s, v0.8h, v6.8h\n" + ".inst 0x6e47ec0c // bfmmla v12.4s, v0.8h, v7.8h\n" ".inst 0x6e46ec2f // bfmmla v15.4s, v1.8h, v6.8h\n" + ".inst 0x6e47ec32 // bfmmla v18.4s, v1.8h, v7.8h\n" ".inst 0x6e46ec55 // bfmmla v21.4s, v2.8h, v6.8h\n" + ".inst 0x6e47ec58 // bfmmla v24.4s, v2.8h, v7.8h\n" ".inst 0x6e46ec7b // bfmmla v27.4s, v3.8h, v6.8h\n" - ".inst 0x6e47ec0c // bfmmla v12.4s, v0.8h, v7.8h\n" + ".inst 0x6e47ec7e // bfmmla v30.4s, v3.8h, v7.8h\n" ".inst 0x6e44ec0a // bfmmla v10.4s, v0.8h, v4.8h\n" ".inst 0x6e45ec0d // bfmmla v13.4s, v0.8h, v5.8h\n" - ".inst 0x6e47ec32 // bfmmla v18.4s, v1.8h, v7.8h\n" ".inst 0x6e44ec30 // bfmmla v16.4s, v1.8h, v4.8h\n" ".inst 0x6e45ec33 // bfmmla v19.4s, v1.8h, v5.8h\n" - ".inst 0x6e47ec58 // bfmmla v24.4s, v2.8h, v7.8h\n" - ".inst 0x6e47ec7e // bfmmla v30.4s, v3.8h, v7.8h\n" ".inst 0x6e44ec56 // bfmmla v22.4s, v2.8h, v4.8h\n" ".inst 0x6e45ec59 // bfmmla v25.4s, v2.8h, v5.8h\n" ".inst 0x6e44ec7c // bfmmla v28.4s, v3.8h, v4.8h\n" ".inst 0x6e45ec7f // bfmmla v31.4s, v3.8h, v5.8h\n" - "cbz x19, 5f\n" + "cbz x20, 5f\n" + "ldp q6, q7, [x22], #0x20\n" "ld1 { v0.8h }, [%x[Apanel]], #0x10\n" - "ld1 { v6.8h }, [x20], #0x10\n" - ".inst 0x6e46ec08 // bfmmla v8.4s, v0.8h, v6.8h\n" "ld1 { v1.8h }, [%x[Apanel]], #0x10\n" - "ld1 { v7.8h }, [x20], #0x10\n" - ".inst 0x6e46ec2e // bfmmla v14.4s, v1.8h, v6.8h\n" + ".inst 0x6e46ec08 // bfmmla v8.4s, v0.8h, v6.8h\n" "ld1 { v2.8h }, [%x[Apanel]], #0x10\n" "ld1 { v3.8h }, [%x[Apanel]], #0x10\n" ".inst 0x6e47ec0b // bfmmla v11.4s, v0.8h, v7.8h\n" - "ldp q4, q5, [x20], #0x20\n" + "ldp q4, q5, [x22], #0x20\n" + ".inst 0x6e46ec2e // bfmmla v14.4s, v1.8h, v6.8h\n" ".inst 0x6e47ec31 // bfmmla v17.4s, v1.8h, v7.8h\n" ".inst 0x6e46ec54 // bfmmla v20.4s, v2.8h, v6.8h\n" ".inst 0x6e47ec57 // bfmmla v23.4s, v2.8h, v7.8h\n" ".inst 0x6e46ec7a // bfmmla v26.4s, v3.8h, v6.8h\n" ".inst 0x6e47ec7d // bfmmla v29.4s, v3.8h, v7.8h\n" - "ldp q6, q7, [x20], #0x20\n" + "ldp q6, q7, [x22], #0x20\n" ".inst 0x6e44ec09 // bfmmla v9.4s, v0.8h, v4.8h\n" + ".inst 0x6e45ec0c // bfmmla v12.4s, v0.8h, v5.8h\n" ".inst 0x6e44ec2f // bfmmla v15.4s, v1.8h, v4.8h\n" + ".inst 0x6e45ec32 // bfmmla v18.4s, v1.8h, v5.8h\n" ".inst 0x6e44ec55 // bfmmla v21.4s, v2.8h, v4.8h\n" + ".inst 0x6e45ec58 // bfmmla v24.4s, v2.8h, v5.8h\n" ".inst 0x6e44ec7b // bfmmla v27.4s, v3.8h, v4.8h\n" - ".inst 0x6e45ec0c // bfmmla v12.4s, v0.8h, v5.8h\n" + ".inst 0x6e45ec7e // bfmmla v30.4s, v3.8h, v5.8h\n" ".inst 0x6e46ec0a // bfmmla v10.4s, v0.8h, v6.8h\n" ".inst 0x6e47ec0d // bfmmla v13.4s, v0.8h, v7.8h\n" - ".inst 0x6e45ec32 // bfmmla v18.4s, v1.8h, v5.8h\n" ".inst 0x6e46ec30 // bfmmla v16.4s, v1.8h, v6.8h\n" ".inst 0x6e47ec33 // bfmmla v19.4s, v1.8h, v7.8h\n" - ".inst 0x6e45ec58 // bfmmla v24.4s, v2.8h, v5.8h\n" - ".inst 0x6e45ec7e // bfmmla v30.4s, v3.8h, v5.8h\n" ".inst 0x6e46ec56 // bfmmla v22.4s, v2.8h, v6.8h\n" ".inst 0x6e47ec59 // bfmmla v25.4s, v2.8h, v7.8h\n" ".inst 0x6e46ec7c // bfmmla v28.4s, v3.8h, v6.8h\n" ".inst 0x6e47ec7f // bfmmla v31.4s, v3.8h, v7.8h\n" "5:" // multiply loop done - "subs x22, x22, #0x1\n" + "subs x23, x23, #0x1\n" "uzp1 v4.2d, v8.2d, v11.2d\n" "uzp2 v8.2d, v8.2d, v11.2d\n" "uzp1 v11.2d, v9.2d, v12.2d\n" @@ -267,7 +263,7 @@ void a64_interleaved_bf16fp32_mmla_8x12_a510( "bne 1b\n" : [Apanel] "+&r" (Apanel), [Cpanel] "+&r" (Cpanel), [ablocks] "+&r" (ablocks) : [args_ptr] "r" (&ka), [offsetof_Bpanel] "I" (offsetof(KernelArgs, Bpanel)), [offsetof_K] "I" (offsetof(KernelArgs, K)), [offsetof_bblocks] "I" (offsetof(KernelArgs, bblocks)) - : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "x19", "x20", "x21", "x22" + : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "x20", "x21", "x22", "x23" ); } |