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 @@ -439,6 +439,19 @@ ], ) +mlir_c_api_cc_library( + name = "CAPIAMDGPU", + srcs = ["lib/CAPI/Dialect/AMDGPU.cpp"], + hdrs = ["include/mlir-c/Dialect/AMDGPU.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":AMDGPUDialect", + ], +) + mlir_c_api_cc_library( name = "CAPIArith", srcs = ["lib/CAPI/Dialect/Arith.cpp"], @@ -539,6 +552,32 @@ ], ) +mlir_c_api_cc_library( + name = "CAPINVGPU", + srcs = ["lib/CAPI/Dialect/NVGPU.cpp"], + hdrs = ["include/mlir-c/Dialect/NVGPU.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":NVGPUDialect", + ], +) + +mlir_c_api_cc_library( + name = "CAPINVVM", + srcs = ["lib/CAPI/Dialect/NVVM.cpp"], + hdrs = ["include/mlir-c/Dialect/NVVM.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":NVVMDialect", + ], +) + mlir_c_api_cc_library( name = "CAPIGPU", srcs = [ @@ -562,6 +601,19 @@ ], ) +mlir_c_api_cc_library( + name = "CAPIROCDL", + srcs = ["lib/CAPI/Dialect/ROCDL.cpp"], + hdrs = ["include/mlir-c/Dialect/ROCDL.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":ROCDLDialect", + ], +) + mlir_c_api_cc_library( name = "CAPISCF", srcs = ["lib/CAPI/Dialect/SCF.cpp"], 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 @@ -125,6 +125,46 @@ ], ) +##---------------------------------------------------------------------------## +# AMDGPU dialect. +##---------------------------------------------------------------------------## + +td_library( + name = "AMDGPUOpsPyTdFiles", + srcs = [], + includes = ["../include"], + deps = [ + "//mlir:AMDGPUTdFiles", + "//mlir:OpBaseTdFiles", + ], +) + +gentbl_filegroup( + name = "AMDGPUOpsPyGen", + tbl_outs = [ + ( + [ + "-gen-python-op-bindings", + "-bind-dialect=amdgpu", + ], + "mlir/dialects/_amdgpu_ops_gen.py", + ), + ], + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/AMDGPUOps.td", + deps = [ + ":AMDGPUOpsPyTdFiles", + ], +) + +filegroup( + name = "AMDGPUOpsPyFiles", + srcs = [ + "mlir/dialects/amdgpu.py", + ":AMDGPUOpsPyGen", + ], +) + ##---------------------------------------------------------------------------## # Linalg dialect. ##---------------------------------------------------------------------------## @@ -511,6 +551,126 @@ ], ) +##---------------------------------------------------------------------------## +# NVGPU dialect. +##---------------------------------------------------------------------------## + +td_library( + name = "NVGPUOpsPyTdFiles", + srcs = [], + includes = ["../include"], + deps = [ + "//mlir:NVGPUTdFiles", + "//mlir:OpBaseTdFiles", + ], +) + +gentbl_filegroup( + name = "NVGPUOpsPyGen", + tbl_outs = [ + ( + [ + "-gen-python-op-bindings", + "-bind-dialect=nvgpu", + ], + "mlir/dialects/_nvgpu_ops_gen.py", + ), + ], + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/NVGPUOps.td", + deps = [ + ":NVGPUOpsPyTdFiles", + ], +) + +filegroup( + name = "NVGPUOpsPyFiles", + srcs = [ + "mlir/dialects/nvgpu.py", + ":NVGPUOpsPyGen", + ], +) + +##---------------------------------------------------------------------------## +# NVVM dialect. +##---------------------------------------------------------------------------## + +td_library( + name = "NVVMOpsPyTdFiles", + srcs = [], + includes = ["../include"], + deps = [ + "//mlir:NVVMOpsTdFiles", + "//mlir:OpBaseTdFiles", + ], +) + +gentbl_filegroup( + name = "NVVMOpsPyGen", + tbl_outs = [ + ( + [ + "-gen-python-op-bindings", + "-bind-dialect=nvvm", + ], + "mlir/dialects/_nvvm_ops_gen.py", + ), + ], + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/NVVMOps.td", + deps = [ + ":NVVMOpsPyTdFiles", + ], +) + +filegroup( + name = "NVVMOpsPyFiles", + srcs = [ + "mlir/dialects/nvvm.py", + ":NVVMOpsPyGen", + ], +) + +##---------------------------------------------------------------------------## +# ROCDL dialect. +##---------------------------------------------------------------------------## + +td_library( + name = "ROCDLOpsPyTdFiles", + srcs = [], + includes = ["../include"], + deps = [ + "//mlir:OpBaseTdFiles", + "//mlir:ROCDLOpsTdFiles", + ], +) + +gentbl_filegroup( + name = "ROCDLOpsPyGen", + tbl_outs = [ + ( + [ + "-gen-python-op-bindings", + "-bind-dialect=rocdl", + ], + "mlir/dialects/_rocdl_ops_gen.py", + ), + ], + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/ROCDLOps.td", + deps = [ + ":ROCDLOpsPyTdFiles", + ], +) + +filegroup( + name = "ROCDLOpsPyFiles", + srcs = [ + "mlir/dialects/rocdl.py", + ":ROCDLOpsPyGen", + ], +) + ##---------------------------------------------------------------------------## # SCF dialect. ##---------------------------------------------------------------------------##