FP16 hswish, clamp and prelu microkernels
PiperOrigin-RevId: 311194603
diff --git a/BUILD.bazel b/BUILD.bazel
index 2e0b28c..9b0287b 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -920,6 +920,12 @@
]
AARCH64_NEONFP16ARITH_UKERNELS = [
+ "src/f16-clamp/gen/neonfp16arith-x16.c",
+ "src/f16-clamp/gen/neonfp16arith-x8.c",
+ "src/f16-hswish/gen/neonfp16arith-x16.c",
+ "src/f16-hswish/gen/neonfp16arith-x8.c",
+ "src/f16-prelu/gen/neonfp16arith-2x16.c",
+ "src/f16-prelu/gen/neonfp16arith-2x8.c",
"src/f16-vbinary/gen/vaddc-minmax-neonfp16arith-x16.c",
"src/f16-vbinary/gen/vaddc-minmax-neonfp16arith-x8.c",
"src/f16-vbinary/gen/vadd-minmax-neonfp16arith-x16.c",
@@ -2659,6 +2665,15 @@
)
xnnpack_unit_test(
+ name = "f16_clamp_test",
+ srcs = [
+ "test/f16-clamp.cc",
+ "test/clamp-microkernel-tester.h",
+ ] + MICROKERNEL_TEST_HDRS,
+ deps = MICROKERNEL_TEST_DEPS,
+)
+
+xnnpack_unit_test(
name = "f32_clamp_test",
srcs = [
"test/f32-clamp.cc",
@@ -2801,6 +2816,15 @@
)
xnnpack_unit_test(
+ name = "f16_hswish_test",
+ srcs = [
+ "test/f16-hswish.cc",
+ "test/hswish-microkernel-tester.h",
+ ] + MICROKERNEL_TEST_HDRS,
+ deps = MICROKERNEL_TEST_DEPS,
+)
+
+xnnpack_unit_test(
name = "f32_hswish_test",
srcs = [
"test/f32-hswish.cc",
@@ -2839,6 +2863,16 @@
)
xnnpack_unit_test(
+ name = "f16_prelu_test",
+ srcs = [
+ "test/f16-prelu.cc",
+ "test/prelu-microkernel-tester.h",
+ "src/xnnpack/AlignedAllocator.h",
+ ] + MICROKERNEL_TEST_HDRS,
+ deps = MICROKERNEL_TEST_DEPS,
+)
+
+xnnpack_unit_test(
name = "f32_prelu_test",
srcs = [
"test/f32-prelu.cc",