diff --git a/third_party/xla/xla/service/cpu/tests/BUILD b/third_party/xla/xla/service/cpu/tests/BUILD index 529106d33da..cbc572ff64d 100644 --- a/third_party/xla/xla/service/cpu/tests/BUILD +++ b/third_party/xla/xla/service/cpu/tests/BUILD @@ -422,6 +422,7 @@ xla_cc_test( "//xla/tsl/platform:test", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest_main", + "@local_tsl//tsl/platform:platform_port", ], ) diff --git a/third_party/xla/xla/service/cpu/tests/onednn_fusion_test.cc b/third_party/xla/xla/service/cpu/tests/onednn_fusion_test.cc index 882d6e69069..9e26ce45dcb 100644 --- a/third_party/xla/xla/service/cpu/tests/onednn_fusion_test.cc +++ b/third_party/xla/xla/service/cpu/tests/onednn_fusion_test.cc @@ -18,6 +18,7 @@ limitations under the License. #include "xla/error_spec.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/platform/test.h" +#include "tsl/platform/cpu_info.h" namespace xla::cpu { namespace { @@ -26,7 +27,8 @@ using OneDnnFusionTest = HloTestBase; inline constexpr bool IsOneDnnGraphEnabled() { #if defined(XLA_ONEDNN_USE_GRAPH_API) - return true; + // Some Aarch64 CPUs have failures. Only test on x86 for now. + return tsl::port::IsX86CPU(); #endif // XLA_ONEDNN_USE_GRAPH_API return false; }