Skip to content

Commit 411952d

Browse files
committed
[cadence] Enable the full hifi op-test suite on the Xtensa ISS
Wire the remaining nine op-level gtests already in the tree into the cadence_hifi_op_tests target, so the hifi-op-test CI stage runs the full suite (cat, div, im2row, permute, transpose, quantize_per_tensor, dequantize_per_tensor, quantized_conv2d, quantized_matmul, quantized_relu) instead of only quantized_relu. Also link aten_ops_cadence, which defines the aten-compliant ops (cat, div, im2row, permute, transpose) that the newly added tests call directly.
1 parent 6288391 commit 411952d

1 file changed

Lines changed: 24 additions & 9 deletions

File tree

backends/cadence/hifi/operators/tests/CMakeLists.txt

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,20 @@ if(NOT TARGET gtest)
4444
)
4545
endif()
4646

47-
# Seed the suite with one quantized op to prove the harness end-to-end on the
48-
# ISS. Further op tests can be added alongside it.
47+
# Op-level gtests, one source per operator. Each calls its kernel directly and
48+
# checks with EXPECT_TENSOR_EQ, mirroring the BUCK tests.
4949
add_executable(
5050
cadence_hifi_op_tests
51+
test_op_cat.cpp
52+
test_op_dequantize_per_tensor_out.cpp
53+
test_op_div.cpp
54+
test_op_im2row_out.cpp
55+
test_op_permute_copy.cpp
56+
test_op_quantize_per_tensor.cpp
57+
test_op_quantized_conv2d_out.cpp
58+
test_op_quantized_matmul_out.cpp
5159
test_op_quantized_relu_out.cpp
60+
test_op_transpose_copy.cpp
5261
${EXECUTORCH_ROOT}/runtime/core/exec_aten/testing_util/tensor_util.cpp
5362
)
5463
target_compile_definitions(cadence_hifi_op_tests PRIVATE GTEST_HAS_PTHREAD=0)
@@ -57,12 +66,18 @@ target_include_directories(
5766
${CMAKE_BINARY_DIR}
5867
)
5968

60-
# Direct-call: link the kernel lib that defines
61-
# impl::HiFi::native::quantized_relu_out (custom_ops), the cadence kernels, and
62-
# the core runtime (executorch provides the platform layer the tests'
63-
# runtime_init() needs). No cadence_ops_lib registry is needed for direct-call
64-
# tests.
69+
# Direct-call: link the libs that define the kernels under test. custom_ops has
70+
# the quantized ops; aten_ops_cadence has the aten-compliant ops (cat, div,
71+
# im2row, permute, transpose); cadence_kernels is the shared nnlib layer;
72+
# executorch provides the platform layer the tests' runtime_init() needs. No
73+
# cadence_ops_lib registry is needed for direct-call tests.
6574
target_link_libraries(
66-
cadence_hifi_op_tests PRIVATE gtest gtest_main gmock executorch custom_ops
67-
cadence_kernels
75+
cadence_hifi_op_tests
76+
PRIVATE gtest
77+
gtest_main
78+
gmock
79+
executorch
80+
custom_ops
81+
aten_ops_cadence
82+
cadence_kernels
6883
)

0 commit comments

Comments
 (0)