Skip to content

Commit

Permalink
Copybara import of the project:
Browse files Browse the repository at this point in the history
--
e853c77 by nithesh <[email protected]>:

Raddextexp - replaced yaml files with header table
Replaced yaml files with header table for Raddextexp op

--
1e33a73 by nithesh <[email protected]>:

Addressed review comments

--
d03ce4f by nithesh <[email protected]>:

Addressed review comments

FUTURE_COPYBARA_INTEGRATE_REVIEW=#7410 from nitheshsrikanth-mcw:xnn_raddextexp 8af7373
PiperOrigin-RevId: 695826022
  • Loading branch information
nitheshsrikanth-mcw authored and xnnpack-bot committed Nov 12, 2024
1 parent 7798ad0 commit a4172bf
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 1,067 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MICROKERNEL_DEFS = [
"src/f32-pavgpool/f32-pavgpool-minmax.h",
"src/f32-qs8-vcvt/f32-qs8-vcvt.h",
"src/f32-qu8-vcvt/f32-qu8-vcvt.h",
"src/f32-radddextexp/f32-radddextexp.h",
"src/f32-vabs/f32-vabs.h",
"src/f32-vbinary/f32-vadd.h",
"src/f32-vbinary/f32-vaddc.h",
Expand Down
3 changes: 0 additions & 3 deletions scripts/generate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,6 @@ tools/generate-ibilinear-chw-test.py --spec test/f32-ibilinear-chw.yaml --output
### Tests for RAddExpMinusMax micro-kernels
tools/generate-raddexpminusmax-test.py --spec test/f32-raddexpminusmax.yaml --output test/f32-raddexpminusmax.cc &

### Tests for RAddExtExp micro-kernels
tools/generate-raddextexp-test.py --spec test/f32-raddextexp.yaml --output test/f32-raddextexp.cc &

### Tests for RAddStoreExpMinusMax micro-kernels
tools/generate-raddstoreexpminusmax-test.py --spec test/f16-raddstoreexpminusmax.yaml --output test/f16-raddstoreexpminusmax.cc &
tools/generate-raddstoreexpminusmax-test.py --spec test/f32-raddstoreexpminusmax.yaml --output test/f32-raddstoreexpminusmax.cc &
Expand Down
55 changes: 55 additions & 0 deletions src/f32-raddextexp/f32-raddextexp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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, element_tile, datatype, params_type, init_params) \
XNN_UKERNEL(arch_flags, ukernel, element_tile, datatype)
#define XNN_DEFINED_UKERNEL_WITH_PARAMS
#endif

#ifndef XNN_UKERNEL
#define XNN_UKERNEL(arch_flags, ukernel, element_tile, datatype) \
XNN_UKERNEL_WITH_PARAMS(arch_flags, ukernel, element_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_raddextexp_ukernel__avx2_p5_u64, 64, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u64_acc2, 64, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u64_acc4, 64, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u72, 72, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u72_acc3, 72, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u80, 80, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u80_acc2, 80, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u80_acc5, 80, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u96, 96, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u96_acc2, 96, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u96_acc3, 96, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86, xnn_f32_raddextexp_ukernel__avx2_p5_u96_acc6, 96, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64

#if XNN_ENABLE_AVX512F && (XNN_ARCH_X86 || XNN_ARCH_X86_64)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u128, 128, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u128_acc2, 128, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u128_acc4, 128, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u144, 144, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u144_acc3, 144, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u160, 160, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u160_acc2, 160, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u160_acc5, 160, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u192, 192, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u192_acc2, 192, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u192_acc3, 192, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
XNN_UKERNEL_WITH_PARAMS(xnn_arch_x86_avx512f, xnn_f32_raddextexp_ukernel__avx512f_p5_scalef_u192_acc6, 192, float, struct xnn_f32_default_params, xnn_f32_raddextexp_ukernel_fn)
#endif // XNN_ENABLE_AVX512F && (XNN_ARCH_X86 || XNN_ARCH_X86_64)

#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
Loading

0 comments on commit a4172bf

Please sign in to comment.