From 1821c69910a6539edbcaf27240788a2d61446f13 Mon Sep 17 00:00:00 2001 From: Dmitry Volodin Date: Thu, 5 Nov 2020 03:31:11 -0800 Subject: [PATCH] PR #44405: Fix typos in compiler directory Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/44405 Splitting #43857 by top-level directories. Copybara import of the project: -- fa5da7d5478649d11321dcac9f867b0a57e4798a by Dmitry Volodin : fix typos in compiler dir -- 4d3c9f047f7ecb8ab299f1bf28a86fd39096eee7 by Dmitry Volodin : fix one test as "atleast" in it comes from Bazel -- 9440ebaaa9fc4a735f7f72f0c8f0de4ec58afbd6 by Dmitry Volodin : a bit more PiperOrigin-RevId: 340819994 --- lib/Dialect/mhlo/IR/hlo_ops.cc | 4 ++-- tests/ops.mlir | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Dialect/mhlo/IR/hlo_ops.cc b/lib/Dialect/mhlo/IR/hlo_ops.cc index 0dd2f8e..50f328b 100644 --- a/lib/Dialect/mhlo/IR/hlo_ops.cc +++ b/lib/Dialect/mhlo/IR/hlo_ops.cc @@ -741,7 +741,7 @@ static LogicalResult Verify(BroadcastInDimOp op) { if (dimIndex >= resultRank) { return op.emitOpError( llvm::formatv("broadcast_dimensions contains invalid value {0} for " - "result result with rank {1}", + "result with rank {1}", dimIndex, resultRank)); } @@ -828,7 +828,7 @@ static LogicalResult Verify(DynamicBroadcastInDimOp op) { if (dimIndex >= resultRank) { return op.emitOpError( llvm::formatv("broadcast_dimensions contains invalid value {0} for " - "result result with rank {1}", + "result with rank {1}", dimIndex, resultRank)); } diff --git a/tests/ops.mlir b/tests/ops.mlir index 2e05697..ae84e1f 100644 --- a/tests/ops.mlir +++ b/tests/ops.mlir @@ -165,7 +165,7 @@ func @broadcast_in_dim_bad_rank_decrease(%arg0: tensor<1x2x3xi32>) -> tensor<3xi // ----- func @broadcast_in_dim_dimension_values_too_large(%arg0: tensor<1x2xi32>) -> tensor<1x2x3xi32> { - // expected-error@+1 {{broadcast_dimensions contains invalid value 9 for result result with rank 3}} + // expected-error@+1 {{broadcast_dimensions contains invalid value 9 for result with rank 3}} %0 = "mhlo.broadcast_in_dim"(%arg0) {broadcast_dimensions = dense<[9, 2]> : tensor<2xi64>} : (tensor<1x2xi32>) -> tensor<1x2x3xi32> return %0 : tensor<1x2x3xi32> }