make a trial on packing GEMM kernel

This commit is contained in:
Youmu Liu
2026-06-11 20:03:02 +08:00
parent 6b449a341e
commit 06a119cc6f
4 changed files with 105 additions and 31 deletions
@@ -170,9 +170,21 @@ SN_MK_PROC_DECL_STD(double, 512, , fill);
SN_MK_PROC_DECL_STD(float, sse, , quality);
SN_MK_PROC_DECL_STD(float, sse, , fma_pack);
SN_MK_PROC_DECL_STD(float, avx, , fma_pack);
SN_MK_PROC_DECL_STD(float, 512, , fma_pack);
/*
* pack left matrix data to L4 buffer
*
* CONVENSIONS:
*
* buffer_1 is pointer to original colum, offset_1 is the offset to the original column, count_1 is the count can be packed
* C# shceduler is responsible for calculating the offset and count based on the actual buffer size and matrix dimension,
* and make sure that count_1 will not exceeds lenght of the column
*
* scalar pack carries column length and offset data:
* [column length, offset, buffer requires, empty]
*/
SN_MK_PROC_DECL_STD(float, sse, , fma_pack_left);
SN_MK_PROC_DECL_STD(float, avx, , fma_pack_left);
SN_MK_PROC_DECL_STD(float, 512, , fma_pack_left);
SN_MK_PROC_DECL_STD(float, sse, , fma);
SN_MK_PROC_DECL_STD(float, avx, , fma);
@@ -183,9 +195,9 @@ SN_MK_PROC_DECL_STD(float, sse, , fma_unpack);
SN_MK_PROC_DECL_STD(float, avx, , fma_unpack);
SN_MK_PROC_DECL_STD(float, 512, , fma_unpack);
SN_MK_PROC_DECL_STD(double, sse, , fma_pack);
SN_MK_PROC_DECL_STD(double, avx, , fma_pack);
SN_MK_PROC_DECL_STD(double, 512, , fma_pack);
SN_MK_PROC_DECL_STD(double, sse, , fma_pack_left);
SN_MK_PROC_DECL_STD(double, avx, , fma_pack_left);
SN_MK_PROC_DECL_STD(double, 512, , fma_pack_left);
SN_MK_PROC_DECL_STD(double, sse, , fma);
SN_MK_PROC_DECL_STD(double, avx, , fma);
+12 -9
View File
@@ -117,15 +117,18 @@ typedef struct matrix_task {
sn_L4_handle buffer_3;
union {
struct {
int offset_0;
int count_0;
int offset_1;
int count_1;
int offset_2;
int count_2;
int offset_3;
int count_3;
uint64_t reverse;
int32_t reverse_0;
int32_t reverse_1;
int32_t offset_0;
int32_t count_0;
int32_t offset_1;
int32_t count_1;
int32_t offset_2;
int32_t count_2;
int32_t offset_3;
int32_t count_3;
int32_t reverse_2;
int32_t reverse_3;
M128 scalar_pack;
};
M512 profile;