From 50ea7f33e27b8eb8097a16d13626d8dd2c3a9ad5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 13 May 2025 09:05:26 -0700 Subject: [PATCH] [mlir] Use llvm::binary_search (NFC) --- mlir/lib/Dialect/Tensor/IR/TensorOps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp index 29da32cd1791c..815806f06b472 100644 --- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp +++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp @@ -1356,7 +1356,7 @@ RankedTensorType GatherOp::inferResultType(RankedTensorType sourceType, SmallVector resultShape(indicesType.getShape().drop_back()); resultShape.reserve(resultShape.size() + sourceType.getRank()); for (int64_t idx : llvm::seq(0, sourceType.getRank())) { - if (std::binary_search(gatherDims.begin(), gatherDims.end(), idx)) { + if (llvm::binary_search(gatherDims, idx)) { if (!rankReduced) resultShape.push_back(1); continue;