Working on L4, now on swiss. FMA_TILE is re arranged.
This commit is contained in:
@@ -182,15 +182,15 @@ SN_MK_PROC_DECL_STD(double, avx, , fma);
|
||||
SN_MK_PROC_DECL_STD(double, avx, _fma, fma);
|
||||
SN_MK_PROC_DECL_STD(double, 512, , fma);
|
||||
|
||||
SN_MK_PROC_DECL_STD(float, sse, , fma);
|
||||
SN_MK_PROC_DECL_STD(float, avx, , fma);
|
||||
SN_MK_PROC_DECL_STD(float, avx, _fma, fma);
|
||||
SN_MK_PROC_DECL_STD(float, 512, , fma);
|
||||
SN_MK_PROC_DECL_STD(float, sse, , tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(float, avx, , tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(float, avx, _fma, tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(float, 512, , tiled_fma);
|
||||
|
||||
SN_MK_PROC_DECL_STD(double, sse, , fma);
|
||||
SN_MK_PROC_DECL_STD(double, avx, , fma);
|
||||
SN_MK_PROC_DECL_STD(double, avx, _fma, fma);
|
||||
SN_MK_PROC_DECL_STD(double, 512, , fma);
|
||||
SN_MK_PROC_DECL_STD(double, sse, , tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(double, avx, , tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(double, avx, _fma, tiled_fma);
|
||||
SN_MK_PROC_DECL_STD(double, 512, , tiled_fma);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
@@ -54,12 +54,12 @@ typedef union scalar_pack {
|
||||
MAT_KERNEL(T) * mat_1; /* Offset 8: 2nd matrix kernel base */ \
|
||||
MAT_KERNEL(T) * mat_2; /* Offset 16: 3rd matrix kernel base */ \
|
||||
void *scalar; /* Offset 24: scalar pack */ \
|
||||
int32_t i; /* Offset 32: row index of the result tile */ \
|
||||
int32_t j; /* Offset 36: column index of the result tile */ \
|
||||
int32_t k; /* Offset 40: column index of the result tile */ \
|
||||
int32_t common_i; /* Offset 44: row index of the result tile */ \
|
||||
int32_t common_j; /* Offset 48: column index of the result tile */ \
|
||||
int32_t common_k; /* Offset 52: column index of the result tile */ \
|
||||
int32_t x; /* Offset 32: row index of the result tile */ \
|
||||
int32_t y; /* Offset 36: column index of the result tile */ \
|
||||
int32_t z; /* Offset 40: column index of the result tile */ \
|
||||
int32_t common_x; /* Offset 44: row index of the result tile */ \
|
||||
int32_t common_y; /* Offset 48: column index of the result tile */ \
|
||||
int32_t common_z; /* Offset 52: column index of the result tile */ \
|
||||
uint32_t mask; /* Offset 56: mask for task schedualing, not useful in C side */ \
|
||||
uint32_t reverse; /* Offset 60: reserved for future use */ \
|
||||
scalar_pack padding; /* Offset 64: padding to make the struct size 128 bytes */ \
|
||||
|
||||
@@ -30,28 +30,28 @@
|
||||
#define _SN_MATPROC_RIGHT_ANS_SCALAR 1
|
||||
#define _SN_MATPROC_ANS_SCALAR 1
|
||||
|
||||
#define _SN_MK_EXPAND_RIGHT_ANS \
|
||||
_mat_kernel_local const *right = mat_task_local->mat_1; \
|
||||
_mat_kernel_local *restrict ans = mat_task_local->mat_2;
|
||||
#define _SN_MK_EXPAND_RIGHT_ANS \
|
||||
SN_MAT_KERNEL_LOCAL const *right = mat_task_local->mat_1; \
|
||||
SN_MAT_KERNEL_LOCAL *restrict ans = mat_task_local->mat_2;
|
||||
|
||||
#define _SN_MK_EXPAND_LEFT_RIGHT_ANS(T) \
|
||||
_mat_kernel_local const *left = mat_task_local->mat_0; \
|
||||
_mat_kernel_local const *right = mat_task_local->mat_1; \
|
||||
_mat_kernel_local *restrict ans = mat_task_local->mat_2;
|
||||
#define _SN_MK_EXPAND_LEFT_RIGHT_ANS \
|
||||
SN_MAT_KERNEL_LOCAL const *left = mat_task_local->mat_0; \
|
||||
SN_MAT_KERNEL_LOCAL const *right = mat_task_local->mat_1; \
|
||||
SN_MAT_KERNEL_LOCAL *restrict ans = mat_task_local->mat_2;
|
||||
|
||||
#define _SN_MK_EXPAND_RIGHT_ANS_SCALAR(T) \
|
||||
_mat_kernel_local const *right = mat_task_local->mat_1; \
|
||||
_mat_kernel_local *restrict ans = mat_task_local->mat_2; \
|
||||
#define _SN_MK_EXPAND_RIGHT_ANS_SCALAR \
|
||||
SN_MAT_KERNEL_LOCAL const *right = mat_task_local->mat_1; \
|
||||
SN_MAT_KERNEL_LOCAL *restrict ans = mat_task_local->mat_2; \
|
||||
scalar_pack *restrict scalar = mat_task_local->scalar;
|
||||
|
||||
#define _SN_MK_EXPAND_LEFT_RIGHT_ANS_SCALAR(T) \
|
||||
_mat_kernel_local const *left = mat_task_local->mat_0; \
|
||||
_mat_kernel_local const *right = mat_task_local->mat_1; \
|
||||
_mat_kernel_local *restrict ans = mat_task_local->mat_2; \
|
||||
#define _SN_MK_EXPAND_LEFT_RIGHT_ANS_SCALAR \
|
||||
SN_MAT_KERNEL_LOCAL const *left = mat_task_local->mat_0; \
|
||||
SN_MAT_KERNEL_LOCAL const *right = mat_task_local->mat_1; \
|
||||
SN_MAT_KERNEL_LOCAL *restrict ans = mat_task_local->mat_2; \
|
||||
scalar_pack *restrict scalar = mat_task_local->scalar;
|
||||
|
||||
#define _SN_MK_EXPAND_ANS_SCALAR(T) \
|
||||
MAT_KERNEL(T) *restrict ans = mat_task_local->mat_2; \
|
||||
#define _SN_MK_EXPAND_ANS_SCALAR \
|
||||
SN_MAT_KERNEL_LOCAL *restrict ans = mat_task_local->mat_2; \
|
||||
scalar_pack *restrict scalar = &(mat_task_local->padding);
|
||||
|
||||
#define _SN_PARAM_STYLE(T) _SN_MATPROC_##T
|
||||
@@ -70,11 +70,17 @@
|
||||
size_t count = UNSAFE_AS(size_t, task->padding.data[1]);
|
||||
|
||||
#define _MK_MKPROC_EXPAND_INDEX_KERNEL \
|
||||
size_t i = UNSAFE_AS(size_t, task->i); \
|
||||
size_t j = UNSAFE_AS(size_t, task->j); \
|
||||
size_t common_i = UNSAFE_AS(size_t, task->common_i); \
|
||||
size_t common_j = UNSAFE_AS(size_t, task->common_j); \
|
||||
size_t common_k = UNSAFE_AS(size_t, task->common_k);
|
||||
size_t x = UNSAFE_AS(size_t, task->x); \
|
||||
size_t y = UNSAFE_AS(size_t, task->y); \
|
||||
size_t common_x = UNSAFE_AS(size_t, task->common_x); \
|
||||
size_t common_y = UNSAFE_AS(size_t, task->common_y); \
|
||||
size_t common_z = UNSAFE_AS(size_t, task->common_z);
|
||||
#define _MK_MKPROC_EXPAND_INDEX_TILE \
|
||||
size_t x = UNSAFE_AS(size_t, task->x); \
|
||||
size_t y = UNSAFE_AS(size_t, task->y); \
|
||||
size_t common_x = UNSAFE_AS(size_t, task->common_x); \
|
||||
size_t common_y = UNSAFE_AS(size_t, task->common_y); \
|
||||
size_t common_z = UNSAFE_AS(size_t, task->common_z);
|
||||
|
||||
#define _SN_MK_EXPAND_MEM(mem) _MK_MKPROC_EXPAND_INDEX_##mem
|
||||
#define _SN_MEM_LAYOUT(T) _SN_MATPROC_LAYOUT_##T
|
||||
@@ -82,7 +88,7 @@
|
||||
#pragma endregion
|
||||
|
||||
#define __mk_param_std(mem, param, T) \
|
||||
typedef MAT_KERNEL(T) _mat_kernel_local; \
|
||||
typedef MAT_KERNEL(T) SN_MAT_KERNEL_LOCAL; \
|
||||
typedef MAT_TASK(T) _mat_task_local; \
|
||||
_mat_task_local *_ = (_SN_PARAM_STYLE(param), (_SN_MEM_LAYOUT(mem)), task); \
|
||||
_SN_MK_EXPAND_PARAM(param); \
|
||||
|
||||
Reference in New Issue
Block a user