Skip to content

Commit

Permalink
xnn_table_exp2minus_k_over_16 extern as uint32_t instead of int
Browse files Browse the repository at this point in the history
- table is really floats but declared as uint32_t
- change extern to match usage

PiperOrigin-RevId: 661635541
  • Loading branch information
fbarchard authored and xnnpack-bot committed Aug 10, 2024
1 parent 0078854 commit 2cd86b3
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions src/amalgam/gen/wasmrelaxedsimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -12339,12 +12339,12 @@ void xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x4c16__wasmsdot(
vacc0x0123 = wasm_f32x4_mul(vacc0x0123, vinput_scale0);

const v128_t vfilter_output_scale0123 = wasm_v128_load(w);
vacc0x0123 = wasm_f32x4_mul(vacc0x0123, vfilter_output_scale0123);
w = (const float*) w + 4;
vacc0x0123 = wasm_f32x4_mul(vacc0x0123, vfilter_output_scale0123);

const v128_t vbias0123 = wasm_v128_load(w);
vacc0x0123 = wasm_f32x4_add(vacc0x0123, vbias0123);
w = (const float*) w + 4;
vacc0x0123 = wasm_f32x4_add(vacc0x0123, vbias0123);

const v128_t vmin = wasm_v128_load64_splat(params->wasmsimd.min);
vacc0x0123 = wasm_f32x4_pmax(vacc0x0123, vmin);
Expand Down Expand Up @@ -12515,18 +12515,18 @@ void xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c16__wasmsdot(
vacc3x0123 = wasm_f32x4_mul(vacc3x0123, vinput_scale3);

const v128_t vfilter_output_scale0123 = wasm_v128_load(w);
w = (const float*) w + 4;
vacc0x0123 = wasm_f32x4_mul(vacc0x0123, vfilter_output_scale0123);
vacc1x0123 = wasm_f32x4_mul(vacc1x0123, vfilter_output_scale0123);
vacc2x0123 = wasm_f32x4_mul(vacc2x0123, vfilter_output_scale0123);
vacc3x0123 = wasm_f32x4_mul(vacc3x0123, vfilter_output_scale0123);
w = (const float*) w + 4;

const v128_t vbias0123 = wasm_v128_load(w);
w = (const float*) w + 4;
vacc0x0123 = wasm_f32x4_add(vacc0x0123, vbias0123);
vacc1x0123 = wasm_f32x4_add(vacc1x0123, vbias0123);
vacc2x0123 = wasm_f32x4_add(vacc2x0123, vbias0123);
vacc3x0123 = wasm_f32x4_add(vacc3x0123, vbias0123);
w = (const float*) w + 4;

const v128_t vmin = wasm_v128_load64_splat(params->wasmsimd.min);
vacc0x0123 = wasm_f32x4_pmax(vacc0x0123, vmin);
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/avx-rr2-lut16-p3.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $SIMD_TILE = BATCH_TILE // 8
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u${BATCH_TILE}(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/avx2-rr1-lut16-p3-gather.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $SIMD_TILE = BATCH_TILE // 8
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u${BATCH_TILE}(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u16(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u24.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u24(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u32(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u40.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u40(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u48.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u48(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx-rr2-lut16-p3-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx_rr2_lut16_p3_u8(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u16(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u24.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u24(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u32(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u40.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u40(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u48.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u48(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u56.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u56(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u64.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u64(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u72.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u72(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u8(
size_t batch,
Expand Down
2 changes: 1 addition & 1 deletion src/f32-velu/gen/f32-velu-avx2-rr1-lut16-p3-gather-u80.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "xnnpack/vunary.h"


extern XNN_INTERNAL const int xnn_table_exp2minus_k_over_16[16];
extern XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16];

void xnn_f32_velu_ukernel__avx2_rr1_lut16_p3_gather_u80(
size_t batch,
Expand Down
20 changes: 10 additions & 10 deletions src/xnnpack/gemm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2614,20 +2614,20 @@ DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_u
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c8__wasmsimd_dot16x2_ld128)

DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x8c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_2x8c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_3x8c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x4c16__wasmusdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x8c16__wasmsdot)
DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_4x8c16__wasmusdot)

DECLARE_QD8_F32_QC8W_GEMM_MINMAX_UKERNEL_FUNCTION(xnn_qd8_f32_qc8w_gemm_minmax_ukernel_1x2__scalar)
Expand Down

0 comments on commit 2cd86b3

Please sign in to comment.