Previously, the dialect was exposed for linking and pass management purposes,
but we did not generate op classes for it. Generate them.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D110819
declare_mlir_dialect_python_bindings(
ADD_TO_PARENT MLIRPythonSources.Dialects
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
+ TD_FILE dialects/SparseTensorOps.td
SOURCES dialects/sparse_tensor.py
DIALECT_NAME sparse_tensor)
--- /dev/null
+//===-- SparseTensorOps.td - Entry point for bindings ------*- tablegen -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef PYTHON_BINDINGS_SPARSE_TENSOR_OPS
+#define PYTHON_BINDINGS_SPARSE_TENSOR_OPS
+
+include "mlir/Bindings/Python/Attributes.td"
+include "mlir/Dialect/SparseTensor/IR/SparseTensorOps.td"
+
+#endif
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+from ._sparse_tensor_ops_gen import *
from .._mlir_libs._mlir.dialects.sparse_tensor import *
from .._mlir_libs import _mlirSparseTensorPasses as _cextSparseTensorPasses