From a582a619e6b81c9379121d2979068cf3938a3ba1 Mon Sep 17 00:00:00 2001 From: lezcano Date: Mon, 23 Jan 2023 07:32:26 +0000 Subject: [PATCH] Forward fix for 81763 See https://github.com/pytorch/pytorch/pull/81763#issuecomment-1399187907 and https://github.com/pytorch/pytorch/pull/81763#issuecomment-1399318349 Now FrobeniusNorm is just left for backwards compatibility, and it dispatches to `at::norm`, which dispatches to `xla::norm`. As such, we don't need the `sqrt` counters as they will not be updated. We remove these checks as those from `TestNorm*` do not have them either. --- test/cpp/test_aten_xla_tensor.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/cpp/test_aten_xla_tensor.cpp b/test/cpp/test_aten_xla_tensor.cpp index 54cbc12ae1e9..3c78805618eb 100644 --- a/test/cpp/test_aten_xla_tensor.cpp +++ b/test/cpp/test_aten_xla_tensor.cpp @@ -1878,9 +1878,6 @@ TEST_F(AtenXlaTensorTest, TestFrobeniusNormInDim) { torch::frobenius_norm(xla_a, {dim}, /*keepdim=*/false); AllClose(b, xla_b); }); - - ExpectCounterNotChanged("aten::.*", cpp_test::GetIgnoredCounters()); - ExpectCounterChanged("xla::norm", cpp_test::GetIgnoredCounters()); } } @@ -1894,10 +1891,6 @@ TEST_F(AtenXlaTensorTest, TestFrobeniusNormInDims) { torch::frobenius_norm(xla_a, dims, /*keepdim=*/false); AllClose(b, xla_b); }); - - ExpectCounterNotChanged("aten::(?!real|conj).*", - cpp_test::GetIgnoredCounters()); - ExpectCounterChanged("xla::sqrt", cpp_test::GetIgnoredCounters()); } }