diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel @@ -42,6 +42,13 @@ ], ) +filegroup( + name = "ExecutionEnginePyIFiles", + srcs = [ + "mlir/_mlir_libs/_mlirExecutionEngine.pyi", + ], +) + filegroup( name = "IRPyFiles", srcs = [ @@ -49,6 +56,14 @@ ], ) +filegroup( + name = "IRPyIFiles", + srcs = [ + "mlir/_mlir_libs/_mlir/__init__.pyi", + "mlir/_mlir_libs/_mlir/ir.pyi", + ], +) + filegroup( name = "PassManagerPyFiles", srcs = [ @@ -56,6 +71,13 @@ ], ) +filegroup( + name = "PassManagerPyIFiles", + srcs = [ + "mlir/_mlir_libs/_mlir/passmanager.pyi", + ], +) + filegroup( name = "RuntimePyFiles", srcs = glob([ @@ -318,16 +340,56 @@ ) ##---------------------------------------------------------------------------## -# Quant dialect. +# PDL dialect. ##---------------------------------------------------------------------------## +td_library( + name = "PDLPyTdFiles", + srcs = [ + "//mlir:include/mlir/Bindings/Python/Attributes.td", + ], + includes = ["../include"], + deps = [ + "//mlir:OpBaseTdFiles", + "//mlir:PDLDialectTdFiles", + ], +) + +gentbl_filegroup( + name = "PDLPyGen", + tbl_outs = [ + ( + [ + "-gen-python-op-bindings", + "-bind-dialect=pdl", + ], + "mlir/dialects/_pdl_ops_gen.py", + ), + ], + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/PDLOps.td", + deps = [ + ":PDLPyTdFiles", + ], +) + filegroup( - name = "QuantPyFiles", + name = "PDLPyIFiles", srcs = [ - "mlir/dialects/quant.py", + "mlir/_mlir_libs/_mlir/dialects/pdl.pyi", + ], +) + +filegroup( + name = "PDLPyFiles", + srcs = [ + "mlir/dialects/_pdl_ops_ext.py", + "mlir/dialects/pdl.py", + ":PDLPyGen", ], ) + ##---------------------------------------------------------------------------## # PythonTest dialect. ##---------------------------------------------------------------------------## @@ -369,6 +431,25 @@ ], ) +##---------------------------------------------------------------------------## +# Quant dialect. +##---------------------------------------------------------------------------## + +filegroup( + name = "QuantPyIFiles", + srcs = [ + "mlir/_mlir_libs/_mlir/dialects/quant.pyi", + ], +) + +filegroup( + name = "QuantPyFiles", + srcs = [ + "mlir/dialects/quant.py", + ], +) + + ##---------------------------------------------------------------------------## # SCF dialect. ##---------------------------------------------------------------------------##