From 4630020419ab999bc2dec8f9bc823b274c85d6fd Mon Sep 17 00:00:00 2001 From: "Dimitar (Mitko) Asenov" Date: Mon, 16 Sep 2024 05:38:20 -0700 Subject: [PATCH] [XLA:GPU] Fix `CHECK:` directives in `cuddn_test.cc` to account for different serializations (without and without new lines). PiperOrigin-RevId: 675111412 --- xla/service/gpu/fusions/cudnn_test.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xla/service/gpu/fusions/cudnn_test.cc b/xla/service/gpu/fusions/cudnn_test.cc index bb07831f5237a..9b513ba16871f 100644 --- a/xla/service/gpu/fusions/cudnn_test.cc +++ b/xla/service/gpu/fusions/cudnn_test.cc @@ -319,14 +319,14 @@ ENTRY e { EXPECT_TRUE(*RunCuDnnFileCheck(kHloText, R"( CHECK: "tensors" CHECK: "out" -CHECK: "dim": [1,1,128] -CHECK: "stride": [1,128,1] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}1,{{[[:space:]]*}}128{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}128,{{[[:space:]]*}}1{{[[:space:]]*}}] CHECK: "p0" -CHECK: "dim": [1,1,64] -CHECK: "stride": [1,64,1] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}1,{{[[:space:]]*}}64{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}64,{{[[:space:]]*}}1{{[[:space:]]*}}] CHECK: "p1" -CHECK: "dim": [1,64,128] -CHECK: "stride": [1,128,1] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}64,{{[[:space:]]*}}128{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}128,{{[[:space:]]*}}1{{[[:space:]]*}}] )")); EXPECT_TRUE(RunAndCompare(kHloText, ErrorSpec{/*aabs=*/1e-3, /*arel=*/1e-3})); @@ -352,14 +352,14 @@ ENTRY e { EXPECT_TRUE(*RunCuDnnFileCheck(kHloText, R"( CHECK: "tensors" CHECK: "out" -CHECK: "dim": [1,256,1] -CHECK: "stride": [1,1,256] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}256,{{[[:space:]]*}}1{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}1,{{[[:space:]]*}}256{{[[:space:]]*}}] CHECK: "p0" -CHECK: "dim": [1,256,64] -CHECK: "stride": [1,1,256] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}256,{{[[:space:]]*}}64{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}1,{{[[:space:]]*}}256{{[[:space:]]*}}] CHECK: "p1" -CHECK: "dim": [1,64,1] -CHECK: "stride": [1,1,64] +CHECK: "dim": [{{[[:space:]]*}}1,{{[[:space:]]*}}64,{{[[:space:]]*}}1{{[[:space:]]*}}] +CHECK: "stride": [{{[[:space:]]*}}1,{{[[:space:]]*}}1,{{[[:space:]]*}}64{{[[:space:]]*}}] )")); EXPECT_TRUE(RunAndCompare(kHloText, ErrorSpec{/*aabs=*/1e-3, /*arel=*/1e-3}));