Updates LLVM usage to match
[131b3b9ed4ef](https://github.com/llvm/llvm-project/commit/131b3b9ed4ef)

PiperOrigin-RevId: 327635089
Change-Id: Ic6ad8d608676bfad3d80834b5be05c3cd863158f
This commit is contained in:
A. Unique TensorFlower 2020-08-20 08:56:53 -07:00 committed by TensorFlower Gardener
parent e7d27d8507
commit 920def4fb8
3 changed files with 62 additions and 3 deletions

View File

@ -276,7 +276,7 @@ class VectorSupportLibrary {
llvm::Constant* scalar_value = llvm::ConstantFP::get(type->getContext(), f);
if (llvm::isa<llvm::VectorType>(type)) {
return llvm::ConstantVector::getSplat(
llvm::ElementCount(vector_size(), /*Scalable=*/false), scalar_value);
llvm::ElementCount::getFixed(vector_size()), scalar_value);
}
return scalar_value;
}

View File

@ -699,8 +699,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
)
# Check out LLVM and MLIR from llvm-project.
LLVM_COMMIT = "f9dc2b7079350d0fed3bb3775f496b90483c9e42"
LLVM_SHA256 = "59866525042c3165c4fcb4c855bc315a390b4ec8eb76846bbd3e5ac3d8f50c1d"
LLVM_COMMIT = "131b3b9ed4efd11d2e50d2963fd11f5d7c7650f0"
LLVM_SHA256 = "f614dc599cc7d10c787f996de7a16c8d43fa38dedad0354501dc22e04520716c"
LLVM_URLS = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
"https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),

View File

@ -121,11 +121,13 @@ cc_library(
srcs = [
"lib/CAPI/IR/AffineMap.cpp",
"lib/CAPI/IR/IR.cpp",
"lib/CAPI/IR/StandardAttributes.cpp",
"lib/CAPI/IR/StandardTypes.cpp",
],
hdrs = [
"include/mlir-c/AffineMap.h",
"include/mlir-c/IR.h",
"include/mlir-c/StandardAttributes.h",
"include/mlir-c/StandardTypes.h",
"include/mlir/CAPI/AffineMap.h",
"include/mlir/CAPI/IR.h",
@ -1763,6 +1765,61 @@ gentbl(
],
)
cc_library(
name = "PDLDialect",
srcs = glob([
"lib/Dialect/PDL/IR/*.cpp",
"lib/Dialect/PDL/IR/*.h",
]),
hdrs = glob([
"include/mlir/Dialect/PDL/IR/*.h",
]),
includes = ["include"],
deps = [
":IR",
":InferTypeOpInterface",
":PDLOpsIncGen",
":SideEffects",
":Support",
"@llvm-project//llvm:Support",
],
)
filegroup(
name = "PDLOpsTdFiles",
srcs = [
"include/mlir/Dialect/PDL/IR/PDLBase.td",
"include/mlir/Dialect/PDL/IR/PDLOps.td",
"include/mlir/IR/SymbolInterfaces.td",
"include/mlir/Interfaces/SideEffectInterfaces.td",
":OpBaseTdFiles",
],
)
gentbl(
name = "PDLOpsIncGen",
strip_include_prefix = "include",
tbl_outs = [
(
"-gen-op-decls",
"include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
),
(
"-gen-op-defs",
"include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
),
(
"-gen-dialect-decls",
"include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
td_srcs = [
":PDLOpsTdFiles",
],
)
# TODO(gcmn): Update SPIRV dependencies so that they map better to cmake files.
filegroup(
name = "SPIRVOpsTdFiles",
@ -2877,6 +2934,7 @@ cc_library(
":NVVMDialect",
":OpenACCDialect",
":OpenMPDialect",
":PDLDialect",
":QuantOps",
":QuantPassIncGen",
":ROCDLDialect",
@ -3781,6 +3839,7 @@ cc_library(
":EDSC",
":IR",
":LLVMDialect",
":LinalgTransforms",
":Pass",
":SCFDialect",
":StandardOps",