mirror of
https://github.com/tensorflow/tensorflow.git
synced 2026-10-26 00:09:51 +08:00
Integrate LLVM at llvm/llvm-project@d5efcd0ec4
Updates LLVM usage to match [d5efcd0ec41d](https://github.com/llvm/llvm-project/commit/d5efcd0ec41d0f425076e3dd738a68d333ad610f) PiperOrigin-RevId: 1004891790
This commit is contained in:
1 parent
d855368598
commit
1cd100073a
7 files changed
+93
-3332
No files matched your search
+61
-24
@@ -1,28 +1,65 @@
|
||||
Auto generated patch. Do not edit or delete it, even if empty.
|
||||
diff -ruN --strip-trailing-cr a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
|
||||
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
|
||||
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
|
||||
@@ -6275,11 +6275,6 @@
|
||||
if (VPI.getOpcode() != Instruction::Trunc)
|
||||
continue;
|
||||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/loop-02-bb1176.ll b/llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/loop-02-bb1176.ll
|
||||
--- a/llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/loop-02-bb1176.ll
|
||||
+++ b/llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/loop-02-bb1176.ll
|
||||
@@ -1,4 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "LV: Found an estimated cost of [0-9]+(.[0-9]+)? for VF 1 For instruction:\s*%v0 = load" --filter "Cost of [0-9]+(.[0-9]+)? for VF [0-9]+: (INTERLEAVE-GROUP with factor [0-9]+,|EXPRESSION|REPLICATE|WIDEN)" --filter "^ ir<.* = load from index" --filter "LV: Selecting VF:" --filter "Estimated cost per lane"
|
||||
+; REQUIRES: asserts
|
||||
; RUN: opt -mtriple=wasm32 -mattr=+simd128 -passes=loop-vectorize %s --debug-only=loop-vectorize --disable-output < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -mtriple=wasm32 -mattr=+simd128 -passes=loop-vectorize %s --vectorizer-maximize-bandwidth --debug-only=loop-vectorize --disable-output < %s 2>&1 | FileCheck %s --check-prefix=MAX
|
||||
|
||||
- // A truncate that is not widened is left to the scalarization decisions
|
||||
- // made earlier.
|
||||
- if (vputils::onlyFirstLaneUsed(&VPI))
|
||||
- continue;
|
||||
-
|
||||
VPValue *Op = VPI.getOperand(0);
|
||||
auto *WideIV = getOptimizableIVOf(Op, PSE);
|
||||
if (!WideIV)
|
||||
@@ -6291,6 +6286,11 @@
|
||||
if (Op != WideIV)
|
||||
continue;
|
||||
diff -ruN --strip-trailing-cr 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
|
||||
@@ -770,6 +770,26 @@
|
||||
)
|
||||
|
||||
+ // A truncate that is not widened is left to the scalarization decisions
|
||||
+ // made earlier.
|
||||
+ if (vputils::onlyFirstLaneUsed(&VPI))
|
||||
+ continue;
|
||||
mlir_c_api_cc_library(
|
||||
+ name = "CAPIOpenACC",
|
||||
+ srcs = [
|
||||
+ "lib/CAPI/Dialect/OpenACC.cpp",
|
||||
+ "lib/CAPI/Dialect/OpenACCPasses.cpp",
|
||||
+ ],
|
||||
+ hdrs = ["include/mlir-c/Dialect/OpenACC.h"],
|
||||
+ capi_deps = [":CAPIIR"],
|
||||
+ header_deps = [":OpenACCPassIncGen"],
|
||||
+ includes = ["include"],
|
||||
+ deps = [
|
||||
+ ":GPUDialect",
|
||||
+ ":IR",
|
||||
+ ":OpenACCAllExtensions",
|
||||
+ ":OpenACCDialect",
|
||||
+ ":OpenACCTransforms",
|
||||
+ ":Pass",
|
||||
+ ],
|
||||
+)
|
||||
+
|
||||
// Replacing a free truncate would add an induction update instruction to
|
||||
// each iteration of the loop. The canonical induction is exempt, as it
|
||||
// needs an update instruction regardless.
|
||||
+mlir_c_api_cc_library(
|
||||
name = "CAPIShape",
|
||||
srcs = ["lib/CAPI/Dialect/Shape.cpp"],
|
||||
hdrs = ["include/mlir-c/Dialect/Shape.h"],
|
||||
@@ -10922,10 +10942,20 @@
|
||||
|
||||
gentbl_cc_library(
|
||||
name = "OpenACCPassIncGen",
|
||||
- tbl_outs = {"include/mlir/Dialect/OpenACC/Transforms/Passes.h.inc": [
|
||||
- "-gen-pass-decls",
|
||||
- "-name=OpenACC",
|
||||
- ]},
|
||||
+ tbl_outs = {
|
||||
+ "include/mlir/Dialect/OpenACC/Transforms/Passes.h.inc": [
|
||||
+ "-gen-pass-decls",
|
||||
+ "-name=OpenACC",
|
||||
+ ],
|
||||
+ "include/mlir/Dialect/OpenACC/Transforms/Passes.capi.h.inc": [
|
||||
+ "-gen-pass-capi-header",
|
||||
+ "--prefix=OpenACC",
|
||||
+ ],
|
||||
+ "include/mlir/Dialect/OpenACC/Transforms/Passes.capi.cpp.inc": [
|
||||
+ "-gen-pass-capi-impl",
|
||||
+ "--prefix=OpenACC",
|
||||
+ ],
|
||||
+ },
|
||||
tblgen = ":mlir-tblgen",
|
||||
td_file = "include/mlir/Dialect/OpenACC/Transforms/Passes.td",
|
||||
deps = [":PassBaseTdFiles"],
|
||||
+2
-2
@@ -19,8 +19,8 @@ load("//third_party:repo.bzl", "tf_http_archive")
|
||||
|
||||
def repo(name):
|
||||
"""Imports LLVM."""
|
||||
LLVM_COMMIT = "634f85fc756b6a6a93800831dcb65f3bf6f93086"
|
||||
LLVM_SHA256 = "2ccb02ee9260da144a7f0c4d9ded3af95a39a9a0ddcabac1bb4d210378f32f80"
|
||||
LLVM_COMMIT = "d5efcd0ec41d0f425076e3dd738a68d333ad610f"
|
||||
LLVM_SHA256 = "388a8ffba67c0e9af2d966dd136138ddc222cdbecc237923c18a42fab646b00f"
|
||||
|
||||
tf_http_archive(
|
||||
name = name,
|
||||
|
||||
-3303
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -18,8 +18,8 @@
|
||||
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
|
||||
|
||||
def repo():
|
||||
SHARDY_COMMIT = "f16d43be0f7c9a7e42c4013180adc5d0594b2535"
|
||||
SHARDY_SHA256 = "be8607a2279333d707fb97a9c23addefc953fb38e626cdb668f9f49668f13fe1"
|
||||
SHARDY_COMMIT = "b85d2632dd8a4c76a652d8ab329d7118ad0b35ea"
|
||||
SHARDY_SHA256 = "20eb2fd15663e1c02e9c580786e8e7d035905a2e659e2ef9e73810a849985db3"
|
||||
|
||||
tf_http_archive(
|
||||
name = "shardy",
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
--- a/lib/Conversion/TritonGPUToLLVM/WarpSpecializeUtility.cpp
|
||||
+++ b/lib/Conversion/TritonGPUToLLVM/WarpSpecializeUtility.cpp
|
||||
@@ -369,8 +369,8 @@
|
||||
MLIRContext *ctx = b.getContext();
|
||||
auto licmMD = LLVM::LoopLICMAttr::get(ctx, b.getBoolAttr(true), {});
|
||||
auto loopMD =
|
||||
- LLVM::LoopAnnotationAttr::get(b.getContext(), {}, {}, {}, {}, {}, licmMD,
|
||||
- {}, {}, {}, {}, {}, {}, {}, {}, {});
|
||||
+ LLVM::LoopAnnotationAttr::get(b.getContext(), {}, {}, {}, {}, {}, {},
|
||||
+ licmMD, {}, {}, {}, {}, {}, {}, {}, {}, {});
|
||||
latchBr.setLoopAnnotationAttr(loopMD);
|
||||
}
|
||||
|
||||
|
||||
--- a/python/src/ir.cc
|
||||
+++ b/python/src/ir.cc
|
||||
@@ -959,7 +959,7 @@
|
||||
self.getBuilder().getBoolAttr(true));
|
||||
mlir::LLVM::LoopAnnotationAttr la =
|
||||
mlir::LLVM::LoopAnnotationAttr::get(
|
||||
- self.getBuilder().getContext(), {}, {}, {}, {}, {},
|
||||
+ self.getBuilder().getContext(), {}, {}, {}, {}, {}, {},
|
||||
licmAttr, {}, {}, {}, {}, {}, {}, {}, {}, {});
|
||||
return la;
|
||||
})
|
||||
|
||||
@@ -38,3 +38,4 @@ cxx17_support.patch
|
||||
llvm_cl996124567.patch
|
||||
llvm_cl998243985.patch
|
||||
llvm_cl1000840178.patch
|
||||
llvm_cl1004097735.patch
|
||||
+1
-1
@@ -68,7 +68,7 @@ class AddLoopUnrollFlagsPass
|
||||
/*followupUnrolled=*/nullptr, /*followupRemainder=*/nullptr,
|
||||
/*followupAll=*/nullptr);
|
||||
auto loop_annotation = mlir::LLVM::LoopAnnotationAttr::get(
|
||||
context,
|
||||
context, /*id=*/nullptr,
|
||||
/*disableNonforced=*/nullptr, /*vectorize=*/nullptr,
|
||||
/*interleave=*/nullptr, loop_unroll,
|
||||
/*unrollAndJam=*/nullptr, /*licm=*/nullptr, /*distribute=*/nullptr,
|
||||
|
||||
Reference in new issue
Block a user