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

PiperOrigin-RevId: 351474229
Change-Id: Icc1ebad3215818e5dfa3bb8fc43b923050df754f
This commit is contained in:
A. Unique TensorFlower 2021-01-12 16:36:18 -08:00 committed by TensorFlower Gardener
parent e3a5ec1690
commit f4a9a6b097
3 changed files with 27 additions and 8 deletions

View File

@ -171,10 +171,10 @@ class LhloFuseLinalgPass
SmallVector<LinalgOp, 8> linalg_ops;
func.walk([&](LinalgOp op) { linalg_ops.push_back(op); });
for (LinalgOp op : llvm::reverse(linalg_ops)) {
for (unsigned id = 0, e = op.getNumInputs(); id < e; ++id) {
for (OpOperand& inputOperand : op.getInputOpOperands()) {
linalg::Aliases aliases;
linalg::LinalgDependenceGraph graph(aliases, linalg_ops);
if (auto info = fuseProducerOfBuffer(b, op, id, graph)) {
if (auto info = fuseProducerOfBuffer(b, inputOperand, graph)) {
auto originalOp = info->originalProducer.getOperation();
erase_set.insert(originalOp);
auto originalOpInLinalgOpsVector = std::find_if(

View File

@ -685,8 +685,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
)
# Check out LLVM and MLIR from llvm-project.
LLVM_COMMIT = "c8a914db5c60dbeb5b638f30a9915855a67805f7"
LLVM_SHA256 = "c19479a75745dae2722bfc6a4da2f83605ce8fdf00f05e784c6272753df4c830"
LLVM_COMMIT = "6f4d460762006af17826693abc1e7139a76aa1f2"
LLVM_SHA256 = "1b0dd96fead94bbef25ad3bacb2ad3de2a42456d85b43c5f0bc3ed5a60a1977c"
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

@ -2948,7 +2948,7 @@ cc_library(
cc_library(
name = "SPIRVSerialization",
srcs = [
"lib/Target/SPIRV/Serialization.cpp",
"lib/Target/SPIRV/Serialization/Serialization.cpp",
],
hdrs = [
"include/mlir/Target/SPIRV/Serialization.h",
@ -2969,9 +2969,10 @@ cc_library(
cc_library(
name = "SPIRVDeserialization",
srcs = [
"lib/Target/SPIRV/Deserialization.cpp",
],
srcs = glob([
"lib/Target/SPIRV/Deserialization/*.cpp",
"lib/Target/SPIRV/Deserialization/*.h",
]),
hdrs = [
"include/mlir/Target/SPIRV/Deserialization.h",
],
@ -4342,6 +4343,23 @@ cc_binary(
## OpenACC dialect
gentbl(
name = "AccCommonGen",
strip_include_prefix = "include",
tbl_outs = [
(
"-gen-directive-decl",
"include/mlir/Dialect/OpenACC/AccCommon.td",
),
],
tblgen = ":mlir-tblgen",
td_file = "@llvm-project//llvm:include/llvm/Frontend/OpenACC/ACC.td",
td_includes = ["external/llvm-project/llvm/include"],
td_srcs = [
"@llvm-project//llvm:acc_td_files",
],
)
gentbl(
name = "OpenACCOpsIncGen",
strip_include_prefix = "include",
@ -4376,6 +4394,7 @@ gentbl(
td_srcs = [
":OpBaseTdFiles",
":OmpCommonTdGen",
"include/mlir/Dialect/OpenACC/AccCommon.td",
],
)