remove branch conflict

This commit is contained in:
Nitload
2025-12-21 23:20:56 +08:00
parent cffe44772e
commit ca5fc9a3f5
13 changed files with 17 additions and 1058 deletions
+4 -27
View File
@@ -1,52 +1,29 @@
#include "sn_intrinsic.h"
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> stgsharp-dev/giga
DECLARE_PNL_PROC_ANS(float, sse, clear)
{
register __m128 zero = _mm_setzero_ps();
PANEL_COL_VEC((*ans), 0, 0) = zero;
PANEL_COL_VEC((*ans), 1, 0) = zero;
PANEL_COL_VEC((*ans), 2, 0) = zero;
PANEL_COL_VEC((*ans), 3, 0) = zero;
for (size_t i = 0; i < 4; i++) {
PANEL_COL_VEC((*ans), i, 0) = zero;
}
}
DECLARE_PNL_PROC_ANS(float, avx, clear)
{
register __m256 zero = _mm256_setzero_ps();
<<<<<<< HEAD
PANEL_COL_VEC((*ans), 0, 0) = zero;
PANEL_COL_VEC((*ans), 1, 0) = zero;
PANEL_COL_VEC((*ans), 2, 0) = zero;
PANEL_COL_VEC((*ans), 3, 0) = zero;
=======
for (size_t i = 0; i < 8; i++) {
PANEL_COL_VEC((*ans), i, 0) = zero;
}
>>>>>>> stgsharp-dev/giga
}
DECLARE_PNL_PROC_ANS(float, 512, clear)
{
register __m512 zero = _mm512_setzero_ps();
<<<<<<< HEAD
PANEL_COL_VEC((*ans), 0, 0) = zero;
PANEL_COL_VEC((*ans), 1, 0) = zero;
PANEL_COL_VEC((*ans), 2, 0) = zero;
PANEL_COL_VEC((*ans), 3, 0) = zero;
}
=======
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
for (size_t i = 0; i < 16; i++) {
PANEL_COL_VEC((*ans), i, 0) = zero;
}
}
>>>>>>> stgsharp-dev/giga
// Matrix transpose implementations
DECLARE_KER_PROC_RIGHT_ANS(float, sse, transpose)
{
-9
View File
@@ -54,10 +54,6 @@ DECLARE_PNL_PROC_LEFT_RIGHT_ANS(float, sse, fma)
// ans = left * right + ans
// right is not transposed
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> stgsharp-dev/giga
DECLARE_PNL_PROC_LEFT_RIGHT_ANS(float, avx_fma, fma)
{
static const __m256i idx0 = { 1, 1, 1, 1, 1, 1, 1, 1 };
@@ -101,11 +97,6 @@ DECLARE_PNL_PROC_LEFT_RIGHT_ANS(float, avx_fma, fma)
// ans = left * right + ans
// right is not transposed
<<<<<<< HEAD
=======
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
>>>>>>> stgsharp-dev/giga
DECLARE_PNL_PROC_LEFT_RIGHT_ANS(float, avx, fma)
{
static const __m256i idx0 = { 1, 1, 1, 1, 1, 1, 1, 1 };
+1 -53
View File
@@ -41,18 +41,10 @@ DECLARE_BUILD_PANEL(avx, float)
}
}
<<<<<<< HEAD
<<<<<<< HEAD
DECLARE_BUILD_PANEL(sse, float)
{
/* Single kernel -> 4 columns, each is one __m128 column vector. */
const MAT_KERNEL(float) *src = matrix + (col_index * row_length + row_index);
=======
DECLARE_BUILD_PANEL(sse, float)
{
/* Single kernel -> 4 columns, each is one __m128 column vector. */
const MAT_KERNEL(float) *src = matrix + (row_index * col_length + col_index);
>>>>>>> stgsharp-dev/giga
for (int pc = 0; pc < 4; ++pc) {
PANEL_COL_VEC((*panel), pc, 0) = src->xmm[pc];
@@ -62,35 +54,22 @@ DECLARE_BUILD_PANEL(sse, float)
DECLARE_BUILD_PANEL(512, float)
{
const MAT_KERNEL(float) *const zero = (const MAT_KERNEL(float) *)&SN_ZERO_KERNEL;
<<<<<<< HEAD
const MAT_KERNEL(float) *k[4][4];
=======
const MAT_KERNEL(float) * k[4][4];
>>>>>>> stgsharp-dev/giga
for (int kc = 0; kc < 4; ++kc) {
for (int kr = 0; kr < 4; ++kr) {
const int col = col_index + kc;
const int row = row_index + kr;
k[kc][kr] = (col < col_length && row < row_length) ?
<<<<<<< HEAD
(matrix + (col * row_length + row)) :
=======
(matrix + (row * col_length + col)) :
>>>>>>> stgsharp-dev/giga
zero;
}
}
/* Each panel column corresponds to a kernel column (0..3) within a block col (0..3). */
for (int pc = 0; pc < 16; ++pc) {
<<<<<<< HEAD
const int blk_col = pc >> 2; /* which kernel column block (0..3) */
const int kc_col = pc & 3; /* column inside a 4x4 kernel */
=======
const int blk_col = pc >> 2; /* which kernel column block (0..3) */
const int kc_col = pc & 3; /* column inside a 4x4 kernel */
>>>>>>> stgsharp-dev/giga
const __m128 r0 = k[blk_col][0]->xmm[kc_col];
const __m128 r1 = k[blk_col][1]->xmm[kc_col];
@@ -107,11 +86,6 @@ DECLARE_BUILD_PANEL(512, float)
}
}
<<<<<<< HEAD
=======
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
>>>>>>> stgsharp-dev/giga
DECLARE_STORE_PANEL(avx, float)
{
const int Q = 8; /* fixed for AVX float panel */
@@ -167,18 +141,10 @@ DECLARE_STORE_PANEL(avx, float)
k_lb->xmm[kc_col] = bot128;
}
}
<<<<<<< HEAD
<<<<<<< HEAD
DECLARE_STORE_PANEL(sse, float)
{
MAT_KERNEL(float) *dst = matrix + (col_index * row_length + row_index);
=======
DECLARE_STORE_PANEL(sse, float)
{
MAT_KERNEL(float) *dst = matrix + (row_index * col_length + col_index);
>>>>>>> stgsharp-dev/giga
for (int pc = 0; pc < 4; ++pc) {
const __m128 col = PANEL_COL_VEC((*panel), pc, 0);
@@ -189,34 +155,21 @@ DECLARE_STORE_PANEL(sse, float)
DECLARE_STORE_PANEL(512, float)
{
MAT_KERNEL(float) zero;
<<<<<<< HEAD
MAT_KERNEL(float) *k[4][4];
=======
MAT_KERNEL(float) * k[4][4];
>>>>>>> stgsharp-dev/giga
for (int kc = 0; kc < 4; ++kc) {
for (int kr = 0; kr < 4; ++kr) {
const int col = col_index + kc;
const int row = row_index + kr;
k[kc][kr] = (col < col_length && row < row_length) ?
<<<<<<< HEAD
(matrix + (col * row_length + row)) :
=======
(matrix + (row * col_length + col)) :
>>>>>>> stgsharp-dev/giga
&zero;
}
}
for (int pc = 0; pc < 16; ++pc) {
<<<<<<< HEAD
const int blk_col = pc >> 2; /* which kernel column block (0..3) */
const int kc_col = pc & 3; /* column inside a 4x4 kernel */
=======
const int blk_col = pc >> 2; /* which kernel column block (0..3) */
const int kc_col = pc & 3; /* column inside a 4x4 kernel */
>>>>>>> stgsharp-dev/giga
const __m512 col = PANEL_COL_VEC((*panel), pc, 0);
@@ -234,8 +187,3 @@ DECLARE_STORE_PANEL(512, float)
k[blk_col][3]->xmm[kc_col] = r3;
}
}
<<<<<<< HEAD
=======
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
>>>>>>> stgsharp-dev/giga
-36
View File
@@ -65,23 +65,11 @@ void load_intrinsic_sse(sn_intrinsic *context)
context->city_hash_simplify = city_hash_simplify_sse;
context->factorial_simd = factorial_simd_sse;
context->index_pair = index_pair_sse;
<<<<<<< HEAD
<<<<<<< HEAD
context->f32_clear_panel = PNL_PROC(float, sse, clear);
context->f32_build_panel = BUILD_PANEL(sse, float);
context->f32_buffer_add = BUF_PROC(float, sse, add);
context->f32_panel_fma = PNL_PROC(float, sse, fma);
=======
context->f32_buffer_add = BUF_PROC(float, sse, add);
context->f32_panel_fma = KER_PROC(float, sse, fma);
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
context->f32_store_panel = STORE_PANEL(sse, float);
context->f32_clear_panel = PNL_PROC(float, sse, clear);
context->f32_build_panel = BUILD_PANEL(sse, float);
context->f32_buffer_add = BUF_PROC(float, sse, add);
context->f32_panel_fma = PNL_PROC(float, sse, fma);
>>>>>>> stgsharp-dev/giga
context->f32_buffer_fill = BUF_PROC(float, sse, fill);
context->variant = BUF_PROC(float, sse, scalar_mul);
context->f32_buffer_sub = BUF_PROC(float, sse, sub);
@@ -95,23 +83,11 @@ void load_intrinsic_avx(sn_intrinsic *context)
context->city_hash_simplify = city_hash_simplify_sse;
context->factorial_simd = factorial_simd_sse;
context->index_pair = index_pair_sse;
<<<<<<< HEAD
<<<<<<< HEAD
context->f32_clear_panel = PNL_PROC(float, avx, clear);
context->f32_build_panel = BUILD_PANEL(avx, float);
context->f32_buffer_add = BUF_PROC(float, avx, add);
context->f32_panel_fma = PNL_PROC(float, avx, fma);
=======
context->f32_buffer_add = BUF_PROC(float, avx, add);
context->f32_panel_fma = KER_PROC(float, sse, fma);
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
context->f32_store_panel = STORE_PANEL(avx, float);
context->f32_clear_panel = PNL_PROC(float, avx, clear);
context->f32_build_panel = BUILD_PANEL(avx, float);
context->f32_buffer_add = BUF_PROC(float, avx, add);
context->f32_panel_fma = PNL_PROC(float, avx, fma);
>>>>>>> stgsharp-dev/giga
context->f32_buffer_fill = BUF_PROC(float, avx, fill);
context->variant = BUF_PROC(float, avx, scalar_mul);
context->f32_buffer_sub = BUF_PROC(float, avx, sub);
@@ -125,23 +101,11 @@ void load_intrinsic_512(sn_intrinsic *context)
context->city_hash_simplify = city_hash_simplify_sse;
context->factorial_simd = factorial_simd_sse;
context->index_pair = index_pair_sse;
<<<<<<< HEAD
<<<<<<< HEAD
context->f32_clear_panel = PNL_PROC(float, sse, clear);
context->f32_build_panel = BUILD_PANEL(512, float);
context->f32_buffer_add = BUF_PROC(float, 512, add);
context->f32_panel_fma = PNL_PROC(float, 512, fma);
=======
context->f32_buffer_add = BUF_PROC(float, 512, add);
context->f32_panel_fma = KER_PROC(float, sse, fma);
>>>>>>> 7bcb460a3994dda40f24cae0044b5a36f4f16515
=======
context->f32_store_panel = STORE_PANEL(512, float);
context->f32_clear_panel = PNL_PROC(float, 512, clear);
context->f32_build_panel = BUILD_PANEL(512, float);
context->f32_buffer_add = BUF_PROC(float, 512, add);
context->f32_panel_fma = PNL_PROC(float, 512, fma);
>>>>>>> stgsharp-dev/giga
context->f32_buffer_fill = BUF_PROC(float, 512, fill);
context->variant = BUF_PROC(float, 512, scalar_mul);
context->f32_buffer_sub = BUF_PROC(float, 512, sub);