Skip to content

Commit ea9058e

Browse files
authored
don't test Half/BFloat16 for pdist_forward in ATen mode (#7977)
Unbreaks internal tests.
1 parent 06ef713 commit ea9058e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernels/test/op_pdist_forward_test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <executorch/kernels/test/FunctionHeaderWrapper.h> // Declares the operator
1010
#include <executorch/kernels/test/TestUtil.h>
11+
#include <executorch/kernels/test/supported_features.h>
1112
#include <executorch/runtime/core/exec_aten/exec_aten.h>
1213
#include <executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
1314
#include <executorch/runtime/core/exec_aten/testing_util/tensor_util.h>
@@ -38,6 +39,12 @@ class OpPdistForwardOutTest : public ::testing::Test {
3839
void test_dtype() {
3940
TensorFactory<DTYPE> tf;
4041

42+
if ((DTYPE == ScalarType::Half || DTYPE == ScalarType::BFloat16) &&
43+
torch::executor::testing::SupportedFeatures::get()->is_aten) {
44+
// ATen doesn't support Half/BFloat for this op.
45+
return;
46+
}
47+
4148
Tensor in = tf.make({4, 5}, {0, 1, 2, 3, 5, 4, 3, 2, -1, 5,
4249
1, 1, -2, 1, 5, 4, 3, 2, -1, 5});
4350
Tensor out = tf.zeros({6});

0 commit comments

Comments
 (0)