8
8
9
9
#include < executorch/kernels/test/FunctionHeaderWrapper.h> // Declares the operator
10
10
#include < executorch/kernels/test/TestUtil.h>
11
+ #include < executorch/kernels/test/supported_features.h>
11
12
#include < executorch/runtime/core/exec_aten/exec_aten.h>
12
13
#include < executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
13
14
#include < executorch/runtime/core/exec_aten/testing_util/tensor_util.h>
@@ -130,6 +131,10 @@ TEST_F(OpFftR2cOutTest, MultipleDims) {
130
131
}
131
132
132
133
TEST_F (OpFftR2cOutTest, InvalidNorm) {
134
+ if (torch::executor::testing::SupportedFeatures::get ()->is_aten ) {
135
+ GTEST_SKIP () << " ATen MKL path does not validate norm" ;
136
+ return ;
137
+ }
133
138
auto invalid_norm = [this ](int64_t norm) {
134
139
test_dtype<float , ScalarType::Float, /* expect_failure = */ true >(norm);
135
140
};
@@ -140,6 +145,10 @@ TEST_F(OpFftR2cOutTest, InvalidNorm) {
140
145
}
141
146
142
147
TEST_F (OpFftR2cOutTest, InvalidDim) {
148
+ if (torch::executor::testing::SupportedFeatures::get ()->is_aten ) {
149
+ GTEST_SKIP () << " ATen fails UBSAN" ;
150
+ return ;
151
+ }
143
152
auto negative_dim = [this ]() {
144
153
test_dtype<float , ScalarType::Float, /* expect_failure = */ true >(0 , -1 );
145
154
test_dtype<float , ScalarType::Float, /* expect_failure = */ true >(0 , 3 );
@@ -150,6 +159,10 @@ TEST_F(OpFftR2cOutTest, InvalidDim) {
150
159
151
160
// TODO: support this and patch test accordingly!
152
161
TEST_F (OpFftR2cOutTest, TwoSidedIsNotSupported) {
162
+ if (torch::executor::testing::SupportedFeatures::get ()->is_aten ) {
163
+ GTEST_SKIP () << " ATen supports two-sided" ;
164
+ return ;
165
+ }
153
166
auto twosided = [this ]() {
154
167
test_dtype<double , ScalarType::Double, /* expect_failure = */ true >(
155
168
0 , 1 , false );
0 commit comments