Skip to content

Commit 50316c1

Browse files
[mlir] Use llvm::binary_search (NFC) (llvm#139760)
1 parent 85bbf8c commit 50316c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ RankedTensorType GatherOp::inferResultType(RankedTensorType sourceType,
13561356
SmallVector<int64_t> resultShape(indicesType.getShape().drop_back());
13571357
resultShape.reserve(resultShape.size() + sourceType.getRank());
13581358
for (int64_t idx : llvm::seq<int64_t>(0, sourceType.getRank())) {
1359-
if (std::binary_search(gatherDims.begin(), gatherDims.end(), idx)) {
1359+
if (llvm::binary_search(gatherDims, idx)) {
13601360
if (!rankReduced)
13611361
resultShape.push_back(1);
13621362
continue;

0 commit comments

Comments
 (0)