Skip to content

Commit 1404640

Browse files
committed
[mlir][Bazel] Add target for index dialect python bindings
1 parent a29e9e3 commit 1404640

File tree

1 file changed

+38
-0
lines changed
  • utils/bazel/llvm-project-overlay/mlir/python

1 file changed

+38
-0
lines changed

utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,44 @@ filegroup(
492492
],
493493
)
494494

495+
##---------------------------------------------------------------------------##
496+
# Index dialect.
497+
##---------------------------------------------------------------------------##
498+
499+
gentbl_filegroup(
500+
name = "IndexOpsPyGen",
501+
tbl_outs = [
502+
(
503+
[
504+
"-gen-python-enum-bindings",
505+
"-bind-dialect=index",
506+
],
507+
"mlir/dialects/_index_enum_gen.py",
508+
),
509+
(
510+
[
511+
"-gen-python-op-bindings",
512+
"-bind-dialect=index",
513+
],
514+
"mlir/dialects/_index_ops_gen.py",
515+
),
516+
],
517+
tblgen = "//mlir:mlir-tblgen",
518+
td_file = "mlir/dialects/IndexOps.td",
519+
deps = [
520+
"//mlir:IndexOpsTdFiles",
521+
"//mlir:OpBaseTdFiles",
522+
],
523+
)
524+
525+
filegroup(
526+
name = "IndexOpsPyFiles",
527+
srcs = [
528+
"mlir/dialects/index.py",
529+
":IndexOpsPyGen",
530+
],
531+
)
532+
495533
##---------------------------------------------------------------------------##
496534
# Math dialect.
497535
##---------------------------------------------------------------------------##

0 commit comments

Comments
 (0)