Skip to content

Commit

Permalink
remove unused aten_compatible argument (#2356)
Browse files Browse the repository at this point in the history
Summary:
bypass-github-export-checks


aten_compatible argument is no longer used in the op_test function. Remove that for mis-leading.

Differential Revision: D54778606
  • Loading branch information
Gasoonjia authored and facebook-github-bot committed Mar 11, 2024
1 parent b088c0b commit e4e5a14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernels/portable/test/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def define_common_targets():
"""
define_supported_features_lib()

op_test(name = "op_allclose_test", aten_compatible = False)
op_test(name = "op_allclose_test")
op_test(name = "op_div_test")
op_test(name = "op_gelu_test")
op_test(name = "op_mul_test")
4 changes: 2 additions & 2 deletions kernels/test/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/kernels/test:util.bzl", "codegen_function_header_wrapper", "generated_op_test", "op_test")

def _common_op_test(name, kernels, aten_compatible = True):
def _common_op_test(name, kernels):
"""
Defines test targets in format of <kernel>_op_<op-name>_test
For ATen kernel testing, let's use portable functions.yaml for tested ops.
"""
for kernel in kernels:
deps = [":function_header_wrapper_{}".format(kernel)]
op_test(name, aten_compatible = aten_compatible, kernel_name = kernel, use_kernel_prefix = True, deps = deps)
op_test(name, kernel_name = kernel, use_kernel_prefix = True, deps = deps)

def make_example_generated_op_test_target():
"""
Expand Down
4 changes: 1 addition & 3 deletions kernels/test/util.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_xplat")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def op_test(name, deps = [], aten_compatible = True, kernel_name = "portable", use_kernel_prefix = False):
def op_test(name, deps = [], kernel_name = "portable", use_kernel_prefix = False):
"""Defines a cxx_test() for an "op_*_test.cpp" file.
Args:
Expand All @@ -11,8 +11,6 @@ def op_test(name, deps = [], aten_compatible = True, kernel_name = "portable", u
under //kernels/<kernel>/...; e.g., "op_add_test" will depend on
"//kernels/portable/cpu:op_add".
deps: Optional extra deps to add to the cxx_test().
aten_compatible: If True, the operator under test is ATen-compatible
(i.e., appears in `functions.yaml`).
kernel_name: The name string as in //executorch/kernels/<kernel_name>.
use_kernel_prefix: If True, the target name is
<kernel>_op_<operator-group-name>_test. Used by common kernel testing.
Expand Down

0 comments on commit e4e5a14

Please sign in to comment.