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

PiperOrigin-RevId: 823542980
This commit is contained in:
A. Unique TensorFlower 2025-10-24 08:38:43 -07:00 committed by TensorFlower Gardener
parent 69c93c6f6a
commit 42d764666d
8 changed files with 2253 additions and 132 deletions

View File

@ -1,34 +1,15 @@
Auto generated patch. Do not edit or delete it, even if empty.
diff -ruN --strip-trailing-cr a/mlir/test/Target/SPIRV/function-decorations-asserts.mlir b/mlir/test/Target/SPIRV/function-decorations-asserts.mlir
--- a/mlir/test/Target/SPIRV/function-decorations-asserts.mlir
+++ b/mlir/test/Target/SPIRV/function-decorations-asserts.mlir
@@ -0,0 +1,20 @@
+// REQUIRES: asserts
+// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file --debug %s | FileCheck %s
+
+spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
+ spirv.func @linkage_attr_test_kernel() "DontInline" attributes {} {
+ %uchar_0 = spirv.Constant 0 : i8
+ %ushort_1 = spirv.Constant 1 : i16
+ %uint_0 = spirv.Constant 0 : i32
+ spirv.FunctionCall @outside.func.with.linkage(%uchar_0):(i8) -> ()
+ spirv.Return
+ }
+ // CHECK: linkage_attributes = #spirv.linkage_attributes<linkage_name = "outside.func", linkage_type = <Import>>
+ spirv.func @outside.func.with.linkage(%arg0 : i8) -> () "Pure" attributes {
+ linkage_attributes=#spirv.linkage_attributes<
+ linkage_name="outside.func",
+ linkage_type=<Import>
+ >
+ }
+ spirv.func @inside.func() -> () "Pure" attributes {} {spirv.Return}
+}
diff -ruN --strip-trailing-cr a/mlir/test/Target/SPIRV/function-decorations.mlir b/mlir/test/Target/SPIRV/function-decorations.mlir
--- a/mlir/test/Target/SPIRV/function-decorations.mlir
+++ b/mlir/test/Target/SPIRV/function-decorations.mlir
@@ -1,5 +1,4 @@
// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file %s | FileCheck %s
-// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file --debug %s | FileCheck %s
diff -ruN --strip-trailing-cr a/mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp b/mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
--- a/mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
+++ b/mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
@@ -189,7 +189,9 @@
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
spirv.func @linkage_attr_test_kernel() "DontInline" attributes {} {
DominanceInfo dom;
llvm::sort(chainOfOps, [&](Operation *l, Operation *r) {
- return dom.dominates(l, r);
+ if (l == r)
+ return false;
+ return dom.properlyDominates(l, r);
});
rewriter.setInsertionPoint(chainOfOps.front());

View File

@ -55,4 +55,4 @@ index 2e3bff53ead9..8d01617effdc 100644
+ "//llvm:macos_x86_64_default": native_arch_defines("X86", "x86_64-unknown-darwin"),
"@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"),
"@bazel_tools//src/conditions:linux_ppc64le": native_arch_defines("PowerPC", "powerpc64le-unknown-linux-gnu"),
"@bazel_tools//src/conditions:linux_s390x": native_arch_defines("SystemZ", "systemz-unknown-linux_gnu"),
"@bazel_tools//src/conditions:linux_riscv64": native_arch_defines("RISCV", "riscv64-unknown-linux-gnu"),

View File

@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "32de3b9ef9e7e8debc14416e968456ca13b48bea"
LLVM_SHA256 = "e048b05e1fb9366e224ea3c06f8473714114039bfad00e81db4ecb6409f23efa"
LLVM_COMMIT = "917d1f20aecfdbdc9e5a7a0eaf947ff7be6fbe15"
LLVM_SHA256 = "8d3d2fe0dfa882a4c4e1c790e2100bc9506b617f50ab30b0c7e303792d9d522f"
tf_http_archive(
name = name,

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
def repo():
SHARDY_COMMIT = "7fed8c5400d6ffd7e46e9ae318b7f55a5f67b91a"
SHARDY_SHA256 = "eb1ce21c6302403d4d215c6f5be24a8790475c861e7303ead2728ab66edeef6d"
SHARDY_COMMIT = "7f12ee2785c049ab8e5d2eafe578c70b0944c004"
SHARDY_SHA256 = "01740c505add441d4156c2a92c0d819605784fa1753c5f63de12c6bffc074532"
tf_http_archive(
name = "shardy",

View File

@ -0,0 +1,11 @@
--- a/python/src/llvm.cc 2025-08-22 04:02:56.000000000 -0700
+++ b/python/src/llvm.cc 2025-10-23 11:14:07.000000000 -0700
@@ -53,7 +53,6 @@
bool disableLLVMOpt = mlir::triton::tools::getBoolEnv("DISABLE_LLVM_OPT");
if (enable_fp_fusion)
opt.AllowFPOpFusion = llvm::FPOpFusion::Fast;
- opt.UnsafeFPMath = false;
opt.NoInfsFPMath = false;
opt.NoNaNsFPMath = true;
opt.TrapUnreachable = true;

View File

@ -8,5 +8,6 @@ LLVM nor MLIR integrator, please do not add any patches to this list.
"""
llvm_patch_list = [
"//third_party/triton:llvm_integration/cl823109577.patch",
# Add new patches just above this line
]

View File

@ -93,7 +93,6 @@ absl::StatusOr<std::unique_ptr<llvm::TargetMachine>> CreateTargetMachine(
if (enable_fp_fusion) {
opt.AllowFPOpFusion = llvm::FPOpFusion::Fast;
}
opt.UnsafeFPMath = false;
opt.NoInfsFPMath = false;
opt.NoNaNsFPMath = true;
opt.TrapUnreachable = true;