-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-- fd9d24d by nithesh <[email protected]>: VMulCAddC-Replaced yaml files with header table Replaced yaml files with header table for vmulcadd op -- 4fb020d by nithesh <[email protected]>: Addressed review comments -- eb27915 by nithesh <[email protected]>: Addressed review comments -- b06ecd1 by nithesh <[email protected]>: Address CI failed checks -- 2fb29c5 by nithesh <[email protected]>: Addressed kernel declarations comment -- a4d5e62 by nithesh <[email protected]>: Resolve "illegal instructions" for AVX512F tests -- 76e4518 by nithesh <[email protected]>: Add support for build bazel -- a472377 by nithesh <[email protected]>: Defined kernel declrations to use all datatype -- e6882d4 by nithesh <[email protected]>: Addressed the merge issue -- 7799d9a by nithesh <[email protected]>: Addressed the test case issue -- a4370dc by nithesh <[email protected]>: Resolve check fails for ARM Arch FUTURE_COPYBARA_INTEGRATE_REVIEW=#7411 from nitheshsrikanth-mcw:xnn_vmulcadd a4370dc PiperOrigin-RevId: 707992277
- Loading branch information
1 parent
08185b7
commit b46cdae
Showing
11 changed files
with
363 additions
and
3,961 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
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, params_type) | ||
#define XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifndef XNN_UKERNEL | ||
#define XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype, params_type) \ | ||
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, 8, 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,61 @@ | ||
// 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, params_type) | ||
#define XNN_DEFINED_UKERNEL_WITH_PARAMS | ||
#endif | ||
|
||
#ifndef XNN_UKERNEL | ||
#define XNN_UKERNEL(arch_flags, ukernel, row_tile, channel_tile, datatype, params_type) \ | ||
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 | ||
|
||
XNN_UKERNEL_WITH_PARAMS(0, xnn_f32_vmulcaddc_minmax_ukernel_c1__scalar_2x, 2, 1, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(0, xnn_f32_vmulcaddc_minmax_ukernel_c2__scalar_2x, 2, 2, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
XNN_UKERNEL_WITH_PARAMS(0, xnn_f32_vmulcaddc_minmax_ukernel_c4__scalar_2x, 2, 4, float, union xnn_f32_minmax_params, xnn_init_f32_minmax_scalar_params) | ||
|
||
#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
Oops, something went wrong.