#include "mlir/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.h"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
usingnamespacemlir::bufferization;
usingnamespacemlir::sparse_tensor;
namespace mlir {
namespace sparse_tensor {
namespace {
template <typename ConcreteModel, typename ConcreteOp>
struct SparseBufferizableOpInterfaceExternalModel
: public BufferizableOpInterface::ExternalModel<ConcreteModel, ConcreteOp> { … };
struct ConcatenateOpInterface
: SparseBufferizableOpInterfaceExternalModel<ConcatenateOpInterface,
sparse_tensor::ConcatenateOp> { … };
struct ConvertOpInterface : public SparseBufferizableOpInterfaceExternalModel<
ConvertOpInterface, sparse_tensor::ConvertOp> { … };
struct LoadOpInterface
: public SparseBufferizableOpInterfaceExternalModel<LoadOpInterface,
sparse_tensor::LoadOp> { … };
struct NewOpInterface
: public SparseBufferizableOpInterfaceExternalModel<NewOpInterface,
sparse_tensor::NewOp> { … };
struct AssembleOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
AssembleOpInterface, sparse_tensor::AssembleOp> { … };
struct DisassembleOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
DisassembleOpInterface, sparse_tensor::DisassembleOp> { … };
struct ForeachOpInterface : public SparseBufferizableOpInterfaceExternalModel<
ForeachOpInterface, sparse_tensor::ForeachOp> { … };
struct NumberOfEntriesOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
NumberOfEntriesOpInterface, sparse_tensor::NumberOfEntriesOp> { … };
struct ToCoordinatesBufferOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
ToCoordinatesBufferOpInterface,
sparse_tensor::ToCoordinatesBufferOp> { … };
struct ToCoordinatesOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
ToCoordinatesOpInterface, sparse_tensor::ToCoordinatesOp> { … };
struct ToPositionsOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
ToPositionsOpInterface, sparse_tensor::ToPositionsOp> { … };
struct ToValuesOpInterface
: public SparseBufferizableOpInterfaceExternalModel<
ToValuesOpInterface, sparse_tensor::ToValuesOp> { … };
}
}
}
void mlir::sparse_tensor::registerBufferizableOpInterfaceExternalModels(
DialectRegistry ®istry) { … }