Skip to content

Commit

Permalink
don't test Half/BFloat16 for pdist_forward in ATen mode (#7977)
Browse files Browse the repository at this point in the history
Unbreaks internal tests.
  • Loading branch information
swolchok authored Jan 27, 2025
1 parent 06ef713 commit ea9058e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kernels/test/op_pdist_forward_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <executorch/kernels/test/FunctionHeaderWrapper.h> // Declares the operator
#include <executorch/kernels/test/TestUtil.h>
#include <executorch/kernels/test/supported_features.h>
#include <executorch/runtime/core/exec_aten/exec_aten.h>
#include <executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
#include <executorch/runtime/core/exec_aten/testing_util/tensor_util.h>
Expand Down Expand Up @@ -38,6 +39,12 @@ class OpPdistForwardOutTest : public ::testing::Test {
void test_dtype() {
TensorFactory<DTYPE> tf;

if ((DTYPE == ScalarType::Half || DTYPE == ScalarType::BFloat16) &&
torch::executor::testing::SupportedFeatures::get()->is_aten) {
// ATen doesn't support Half/BFloat for this op.
return;
}

Tensor in = tf.make({4, 5}, {0, 1, 2, 3, 5, 4, 3, 2, -1, 5,
1, 1, -2, 1, 5, 4, 3, 2, -1, 5});
Tensor out = tf.zeros({6});
Expand Down

0 comments on commit ea9058e

Please sign in to comment.