Skip to content

Commit

Permalink
[Bazel] Add Bazel build files for Python bindings of the GPU dialect (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
apaszke committed Nov 23, 2023
1 parent 002d471 commit 0ca830e
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,62 @@ filegroup(
],
)

##---------------------------------------------------------------------------##
# GPU dialect.
##---------------------------------------------------------------------------##

td_library(
name = "GPUOpsPyTdFiles",
srcs = [],
includes = ["../include"],
deps = [
"//mlir:GPUOpsTdFiles",
"//mlir:OpBaseTdFiles",
],
)

gentbl_filegroup(
name = "GPUOpsPyGen",
tbl_outs = [
(
[
"-gen-python-enum-bindings",
"-bind-dialect=gpu",
],
"mlir/dialects/_gpu_enum_gen.py",
),
(
[
"-gen-python-op-bindings",
"-bind-dialect=gpu",
],
"mlir/dialects/_gpu_ops_gen.py",
),
],
tblgen = "//mlir:mlir-tblgen",
td_file = "mlir/dialects/GPUOps.td",
deps = [
":GPUOpsPyTdFiles",
],
)

filegroup(
name = "GPUOpsPyFiles",
srcs = [
":GPUOpsPyGen",
],
)

filegroup(
name = "GPUOpsPackagePyFiles",
srcs = glob(["mlir/dialects/gpu/*.py"]),
)

filegroup(
name = "GPUOpsPackagePassesPyFiles",
srcs = glob(["mlir/dialects/gpu/passes/*.py"]),
)

##---------------------------------------------------------------------------##
# NVGPU dialect.
##---------------------------------------------------------------------------##
Expand Down

0 comments on commit 0ca830e

Please sign in to comment.