//===- SparseTensorInterfaces.cpp - SparseTensor interfaces impl ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h" #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h" #include "mlir/Dialect/SparseTensor/IR/SparseTensorType.h" #include "mlir/IR/PatternMatch.h" usingnamespacemlir; usingnamespacemlir::sparse_tensor; #include "mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.cpp.inc" /// Stage the operations into a sequence of simple operations as follow: /// op -> unsorted_coo + /// unsorted_coo -> sorted_coo + /// sorted_coo -> dstTp. /// /// return `tmpBuf` if a intermediate memory is allocated. LogicalResult sparse_tensor::detail::stageWithSortImpl( StageWithSortSparseOp op, PatternRewriter &rewriter, Value &tmpBufs) { … }