Skip to content

Commit

Permalink
[ArmSVE][NVVM][Bazel] Added Features to BUILD.bazel file (#68949)
Browse files Browse the repository at this point in the history
Added VectorOps support for ArmSVE in BUILD.bazel
Added BasicPtxBuilderInterface support for NVVM in build.bazel
  • Loading branch information
bviyer authored Oct 13, 2023
1 parent 37a5304 commit 28b27c1
Showing 1 changed file with 63 additions and 17 deletions.
80 changes: 63 additions & 17 deletions utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,7 @@ cc_library(
":IR",
":LLVMDialect",
":SideEffectInterfaces",
":VectorDialect",
"//llvm:Core",
"//llvm:Support",
],
Expand All @@ -2109,13 +2110,12 @@ cc_library(
includes = ["include"],
deps = [
":ArmSVEDialect",
":DialectUtils",
":FuncDialect",
":IR",
":LLVMCommonConversion",
":LLVMDialect",
":TransformUtils",
"//llvm:Core",
"//llvm:Support",
":VectorDialect",
],
)

Expand Down Expand Up @@ -4816,6 +4816,7 @@ cc_library(
"lib/Dialect/LLVMIR/IR/NVVM*.cpp",
"lib/Dialect/LLVMIR/IR/NVVM*.h",
"lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
"lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp",
"lib/Dialect/LLVMIR/IR/ROCDL*.h",
"lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
"lib/Dialect/LLVMIR/IR/*X86Vector*.h",
Expand All @@ -4827,6 +4828,7 @@ cc_library(
"include/mlir/Dialect/LLVMIR/*AMX*.h",
"include/mlir/Dialect/LLVMIR/*ArmSVE*.h",
"include/mlir/Dialect/LLVMIR/NVVM*.h",
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h",
"include/mlir/Dialect/LLVMIR/ROCDL*.h",
"include/mlir/Dialect/LLVMIR/*X86Vector*.h",
],
Expand Down Expand Up @@ -5768,6 +5770,7 @@ cc_library(
hdrs = ["include/mlir/Dialect/LLVMIR/NVVMDialect.h"],
includes = ["include"],
deps = [
":BasicPtxBuilderInterface",
":ConvertToLLVM",
":DialectUtils",
":GPUDialect",
Expand Down Expand Up @@ -5822,18 +5825,57 @@ cc_library(
],
)

td_library(
name = "BasicPtxBuilderIntTdFiles",
srcs = [
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td",
],
includes = ["include"],
deps = [
":GPUOpsTdFiles",
":LLVMOpsTdFiles",
":OpBaseTdFiles",
],
)

td_library(
name = "NVVMOpsTdFiles",
srcs = ["include/mlir/Dialect/LLVMIR/NVVMOps.td"],
includes = ["include"],
deps = [
":BasicPtxBuilderIntTdFiles",
":GPUOpsTdFiles",
":LLVMOpsTdFiles",
":OpBaseTdFiles",
":SideEffectInterfacesTdFiles",
],
)

gentbl_cc_library(
name = "BasicPtxBuilderIntGen",
tbl_outs = [
(
[
"-gen-op-interface-decls",
],
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h.inc",
),
(
[
"-gen-op-interface-defs",
],
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.cpp.inc",
),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td",
deps = [
":BasicPtxBuilderIntTdFiles",
":GPUOpsTdFiles",
":LLVMOpsTdFiles",
],
)

gentbl_cc_library(
name = "NVVMOpsIncGen",
tbl_outs = [
Expand Down Expand Up @@ -5881,20 +5923,6 @@ gentbl_cc_library(
],
"include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc",
),
(
[
"-gen-op-interface-decls",
"-attrdefs-dialect=nvvm",
],
"include/mlir/Dialect/LLVMIR/NVVMOpsInterface.h.inc",
),
(
[
"-gen-op-interface-defs",
"-attrdefs-dialect=nvvm",
],
"include/mlir/Dialect/LLVMIR/NVVMOpsInterface.cpp.inc",
),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
Expand All @@ -5914,6 +5942,22 @@ gentbl_cc_library(
deps = [":NVVMOpsTdFiles"],
)

cc_library(
name = "BasicPtxBuilderInterface",
srcs = ["lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp"],
hdrs = [
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h",
],
includes = ["include"],
deps = [
":BasicPtxBuilderIntGen",
":IR",
":LLVMDialect",
":Support",
],
)


cc_library(
name = "NVVMToLLVM",
srcs = glob(["lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp"]),
Expand Down Expand Up @@ -7996,6 +8040,7 @@ cc_library(
":LLVMIntrinsicConversionIncGen",
":OpenMPDialect",
":Support",
":TransformUtils",
"//llvm:Core",
"//llvm:FrontendOpenMP",
"//llvm:Support",
Expand Down Expand Up @@ -8201,6 +8246,7 @@ cc_library(
":OpenMPCommon",
":Support",
":ToLLVMIRTranslation",
":TransformUtils",
"//llvm:Core",
"//llvm:FrontendOpenMP",
"//llvm:Support",
Expand Down

0 comments on commit 28b27c1

Please sign in to comment.