diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp --- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp +++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h" + #include "mlir/IR/Builders.h" #include "mlir/IR/DialectImplementation.h" #include "mlir/IR/Matchers.h" @@ -16,8 +17,6 @@ using namespace mlir; using namespace mlir::sparse_tensor; -#include "mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc" - //===----------------------------------------------------------------------===// // TensorDialect Attribute Methods. //===----------------------------------------------------------------------===// @@ -351,3 +350,5 @@ #define GET_OP_CLASSES #include "mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc" + +#include "mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc" diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -1917,9 +1917,7 @@ cc_library( name = "SparseTensor", - srcs = glob([ - "lib/Dialect/SparseTensor/IR/*.cpp", - ]), + srcs = ["lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp"], hdrs = ["include/mlir/Dialect/SparseTensor/IR/SparseTensor.h"], includes = ["include"], deps = [