-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-- 47192e6 by nithesh <[email protected]>: VMulCAddC-Replaced yaml files with header table Replaced yaml files with header table for vmulcadd op -- d8dd82d by nithesh <[email protected]>: Addressed review comments -- cf7f1c3 by nithesh <[email protected]>: Addressed review comments FUTURE_COPYBARA_INTEGRATE_REVIEW=#7411 from nitheshsrikanth-mcw:xnn_vmulcadd 1f6456a PiperOrigin-RevId: 695565047
- Loading branch information
1 parent
7798ad0
commit 673feb6
Showing
9 changed files
with
348 additions
and
3,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
#ifndef XNN_UKERNEL_WITH_PARAMS | ||
#define XNN_UKERNEL_WITH_PARAMS(arch_flags, ukernel, row_tile, channel_tile, datatype, params_type, init_params) \ | ||
XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype) | ||
#define XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifndef XNN_UKERNEL | ||
#define XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype) \ | ||
XNN_UKERNEL_WITH_PARAMS(arch_flags, ukernel, row_tile, channel_tile, datatype, void, /*init_params=*/nullptr) | ||
#define XNN_DEFINED_UKERNEL | ||
#endif | ||
|
||
#if XNN_ARCH_X86 || XNN_ARCH_X86_64 | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_X86, xnn_f16_vmulcaddc_minmax_ukernel_c8__fma3_2x, 2, 8, xnn_float16, union xnn_f16_minmax_params, xnn_init_f16_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_X86, xnn_f16_vmulcaddc_minmax_ukernel_c16__fma3_2x, 2, 16, xnn_float16, union xnn_f16_minmax_params, xnn_init_f16_minmax_scalar_params) | ||
#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 | ||
|
||
#if XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f16_vmulcaddc_minmax_ukernel_c8__neonfp16arith_2x, 2, 28, xnn_float16, union xnn_f16_minmax_params, xnn_init_f16_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f16_vmulcaddc_minmax_ukernel_c16__neonfp16arith_2x, 2, 16, xnn_float16, union xnn_f16_minmax_params, xnn_init_f16_minmax_scalar_params) | ||
#endif // XNN_ENABLE_ARM_FP16_VECTOR && (XNN_ARCH_ARM || XNN_ARCH_ARM64) | ||
|
||
#ifdef XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#undef XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#undef XNN_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifdef XNN_DEFINED_UKERNEL | ||
#undef XNN_DEFINED_UKERNEL | ||
#undef XNN_UKERNEL | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
#include "xnnpack/microparams-init.h" | ||
#ifndef XNN_UKERNEL_WITH_PARAMS | ||
#define XNN_UKERNEL_WITH_PARAMS(arch_flags, ukernel, row_tile, channel_tile, datatype, params_type, init_params) \ | ||
XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype) | ||
#define XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifndef XNN_UKERNEL | ||
#define XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype) \ | ||
XNN_UKERNEL_WITH_PARAMS(arch_flags, ukernel, row_tile, channel_tile, datatype, void, /*init_params=*/nullptr) | ||
#define XNN_DEFINED_UKERNEL | ||
#endif | ||
|
||
#if XNN_ARCH_X86 || XNN_ARCH_X86_64 | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_X86, xnn_f32_vmulcaddc_minmax_ukernel_c4__sse_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_X86, xnn_f32_vmulcaddc_minmax_ukernel_c8__sse_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 | ||
|
||
#if XNN_ARCH_ARM || XNN_ARCH_ARM64 | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f32_vmulcaddc_minmax_ukernel_c4__neon_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f32_vmulcaddc_minmax_ukernel_c4__neonfma_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f32_vmulcaddc_minmax_ukernel_c8__neon_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_ARM, xnn_f32_vmulcaddc_minmax_ukernel_c8__neonfma_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 | ||
|
||
#if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c4__wasmsimd_arm_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c4__wasmsimd_x86_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c8__wasmsimd_arm_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c8__wasmsimd_x86_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
#endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD | ||
|
||
#if XNN_ARCH_WASMRELAXEDSIMD | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMRELAXEDSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c4__wasmrelaxedsimd_fma_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMRELAXEDSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c4__wasmrelaxedsimd_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMRELAXEDSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c8__wasmrelaxedsimd_fma_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASMRELAXEDSIMD, xnn_f32_vmulcaddc_minmax_ukernel_c8__wasmrelaxedsimd_2x, 2, 8, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
#endif // XNN_ARCH_WASMRELAXEDSIMD | ||
|
||
#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASM, xnn_f32_vmulcaddc_minmax_ukernel_c1__wasm_2x, 2, 1, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASM, xnn_f32_vmulcaddc_minmax_ukernel_c2__wasm_2x, 2, 2, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(XNN_ARCH_WASM, xnn_f32_vmulcaddc_minmax_ukernel_c4__wasm_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD | ||
|
||
#ifdef XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#undef XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#undef XNN_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifdef XNN_DEFINED_UKERNEL | ||
#undef XNN_DEFINED_UKERNEL | ||
#undef XNN_UKERNEL | ||
#endif |
Oops, something went wrong.