xref: /aosp_15_r20/external/executorch/kernels/portable/cpu/test/targets.bzl (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2
3def define_common_targets():
4    """Defines targets that should be shared between fbcode and xplat.
5
6    The directory containing this targets.bzl file should also contain both
7    TARGETS and BUCK files that call this function.
8    """
9
10    #
11    # NOTE: tests for operators should live in kernels/portable/test, so that
12    # they can be run against all implementations of a given operator. This
13    # directory is only for testing cpu-specific helper libraries.
14    #
15
16    runtime.cxx_test(
17        name = "scalar_utils_test",
18        srcs = ["scalar_utils_test.cpp"],
19        deps = [
20            "//executorch/kernels/portable/cpu:scalar_utils",
21            "//executorch/runtime/core/exec_aten/util:tensor_util",
22        ],
23    )
24
25    runtime.cxx_test(
26        name = "vec_ops_test",
27        srcs = ["vec_ops_test.cpp"],
28        deps = ["//executorch/kernels/portable/cpu:vec_ops"],
29    )
30