Skip to content

don't test Half/BFloat16 for cdist_forward in ATen mode #7980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions kernels/test/op_cdist_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 @@ -45,6 +46,12 @@ class OpCdistForwardOutTest : 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 x1 = tf.make({2, 1, 4, 3}, {0, 1, 2, 3, 5, 4, 3, -3, 7, 1, 6, 2,
-1, 5, 1, 1, -2, 1, 5, 4, 3, 2, -1, 5});
Tensor x2 = tf.make(
Expand Down
Loading