add double compute kernel

This commit is contained in:
Youmu Liu
2025-12-26 17:16:12 +08:00
parent e5539bcc6d
commit c6d53d97ea
16 changed files with 821 additions and 300 deletions
+72 -33
View File
@@ -65,17 +65,30 @@ 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;
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);
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);
context->f32_buffer_transpose = KER_PROC(float, sse, transpose);
context->f32_buffer_scalar_mul = BUF_PROC(float, sse, scalar_mul);
context->f32_normalize_3 = f32_normalize;
context->mat_f32_buffer_add = BUF_PROC(float, sse, add);
context->mat_f32_buffer_fill = BUF_PROC(float, sse, fill);
context->mat_f32_buffer_scalar_mul = BUF_PROC(float, sse, scalar_mul);
context->mat_f32_buffer_sub = BUF_PROC(float, sse, sub);
context->mat_f32_buffer_transpose = KER_PROC(float, sse, transpose);
context->mat_f32_build_panel = NULL;
context->mat_f32_clear_panel = PNL_PROC(float, sse, clear);
context->mat_f32_panel_fma = PNL_PROC(float, sse, fma);
context->mat_f32_pivot = pivot_float;
context->mat_f32_store_panel = NULL;
context->mat_f64_buffer_add = NULL;
context->mat_f64_buffer_fill = NULL;
context->mat_f64_buffer_scalar_mul = NULL;
context->mat_f64_buffer_sub = NULL;
context->mat_f64_buffer_transpose = NULL;
context->mat_f64_build_panel = NULL;
context->mat_f64_clear_panel = NULL;
context->mat_f64_panel_fma = NULL;
context->mat_f64_pivot = NULL;
context->mat_f64_store_panel = NULL;
context->vec_f32_normalize_3 = f32_normalize;
}
void load_intrinsic_avx(sn_intrinsic *context)
@@ -83,17 +96,30 @@ 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;
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);
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);
context->f32_buffer_transpose = KER_PROC(float, avx, transpose);
context->f32_buffer_scalar_mul = BUF_PROC(float, avx, scalar_mul);
context->f32_normalize_3 = f32_normalize;
context->mat_f32_buffer_add = BUF_PROC(float, avx, add);
context->mat_f32_buffer_fill = BUF_PROC(float, avx, fill);
context->mat_f32_buffer_scalar_mul = BUF_PROC(float, avx, scalar_mul);
context->mat_f32_buffer_sub = BUF_PROC(float, avx, sub);
context->mat_f32_buffer_transpose = KER_PROC(float, avx, transpose);
context->mat_f32_build_panel = BUILD_PANEL(avx, float);
context->mat_f32_clear_panel = PNL_PROC(float, avx, clear);
context->mat_f32_panel_fma = PNL_PROC(float, avx, fma);
context->mat_f32_pivot = pivot_float;
context->mat_f32_store_panel = STORE_PANEL(avx, float);
context->mat_f64_buffer_add = BUF_PROC(double, avx, add);
context->mat_f64_buffer_fill = BUF_PROC(double, avx, fill);
context->mat_f64_buffer_scalar_mul = BUF_PROC(double, avx, scalar_mul);
context->mat_f64_buffer_sub = BUF_PROC(double, avx, sub);
context->mat_f64_buffer_transpose = NULL;
context->mat_f64_build_panel = NULL;
context->mat_f64_clear_panel = PNL_PROC(double, avx, clear);
context->mat_f64_panel_fma = NULL;
context->mat_f64_pivot = NULL;
context->mat_f64_store_panel = NULL;
context->vec_f32_normalize_3 = f32_normalize;
}
void load_intrinsic_512(sn_intrinsic *context)
@@ -101,15 +127,28 @@ 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;
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);
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);
context->f32_buffer_transpose = KER_PROC(float, 512, transpose);
context->f32_buffer_scalar_mul = BUF_PROC(float, 512, scalar_mul);
context->f32_normalize_3 = f32_normalize;
context->mat_f32_buffer_add = BUF_PROC(float, 512, add);
context->mat_f32_buffer_fill = BUF_PROC(float, 512, fill);
context->mat_f32_buffer_scalar_mul = BUF_PROC(float, 512, scalar_mul);
context->mat_f32_buffer_sub = BUF_PROC(float, 512, sub);
context->mat_f32_buffer_transpose = KER_PROC(float, 512, transpose);
context->mat_f32_build_panel = BUILD_PANEL(512, float);
context->mat_f32_clear_panel = PNL_PROC(float, 512, clear);
context->mat_f32_panel_fma = PNL_PROC(float, 512, fma);
context->mat_f32_pivot = pivot_float;
context->mat_f32_store_panel = STORE_PANEL(512, float);
context->mat_f64_buffer_add = NULL;
context->mat_f64_buffer_fill = NULL;
context->mat_f64_buffer_scalar_mul = NULL;
context->mat_f64_buffer_sub = NULL;
context->mat_f64_buffer_transpose = NULL;
context->mat_f64_build_panel = NULL;
context->mat_f64_clear_panel = NULL;
context->mat_f64_panel_fma = NULL;
context->mat_f64_pivot = NULL;
context->mat_f64_store_panel = NULL;
context->vec_f32_normalize_3 = f32_normalize;
}