s390x: Add vectorized sgemm kernel for Z14 and newer
authorMarius Hillenbrand <mhillen@linux.ibm.com>
Tue, 12 May 2020 12:13:54 +0000 (14:13 +0200)
committerMarius Hillenbrand <mhillen@linux.ibm.com>
Tue, 12 May 2020 13:59:51 +0000 (15:59 +0200)
commit43c0d4f312ba3cd1a0ff8f389e6eded98113c0dd
treeef8470b3caebe39cf75d2699cc73a4b2eecb2570
parentd7c1677c20c326d4bf0f2cefc2c7ce36f7df3149
s390x: Add vectorized sgemm kernel for Z14 and newer

Add a new GEMM kernel implementation to exploit the FP32 SIMD
operations introduced with z14 and employ it for SGEMM on z14 and newer
architectures.

The SIMD extensions introduced with z13 support operations on
double-sized scalars in vector registers. Thus, the existing SGEMM code
would extend floats to doubles before operating on them. z14 extended
SIMD support to operations on 32-bit floats. By employing these
instructions, we can operate on twice the number of scalars per
instruction (four floats in each vector registers) and avoid the
conversion operations.

The code is written in C with explicit vectorization. In experiments,
this kernel improves performance on z14 and z15 by around 2x over the
current implementation in assembly. The flexibilty of the C code paves
the way for adjustments in subsequent commits.

Tested via make -C test / ctest / utest and by a couple of additional
unit tests that exercise blocking (e.g., partial register blocks with
fewer than UNROLL_M rows and/or fewer than UNROLL_N columns).

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
Makefile.zarch
kernel/zarch/KERNEL.Z14
kernel/zarch/gemm_vec.c [new file with mode: 0644]