Skip to content

VORTEXM4: STRMM/DTRMM at about half of Accelerate at n = 1024 #6147

Open

Description

@tesch1

STRMM and DTRMM on VORTEXM4 (SME2 kernels from #6074) are slower than the other level-3 routines also at large sizes. On an M4 Pro, one thread, n = 1024: all 16 STRMM variants run at 780-888 GFLOPS, Accelerate at 1536-1562 (0.52x); DTRMM is at 0.61x. At n = 4096 STRMM is at 0.78-0.86x. SYMM, which uses the same GEMM kernel through the level-3 driver, reaches 0.93x at n = 1024.

The difference is therefore specific to the TRMM path. Candidates, not yet measured separately:

  • the TRMM kernel (gemm_kernel_sme2.c with TRMMKERNEL) zeroes ZA and stores C = alpha * ZA with a per-row scale-only store (s2_c_store_alpha), not the four-row fast path of the GEMM case;
  • the triangle copies (trmm_ncopy_sme2.c, trmm_tcopy_sme2.c, ~43 GB/s, see VORTEXM4: packing dominates SME2 level-3 at small n #6146);
  • driver/level3/trmm_L.c / trmm_R.c call the kernel on chunks of at most 3 x GEMM_UNROLL_N = 48 columns.

A first step is a profile that separates kernel time, copy time and driver overhead at n = 1024.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions