From 7e1c942100039dc0a9adda5d0d45c7e1d2e3b76c Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 26 Feb 2021 04:03:59 -0800 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@bf6380c0966b Updates LLVM usage to match [bf6380c0966b](https://github.com/llvm/llvm-project/commit/bf6380c0966b) PiperOrigin-RevId: 359728311 Change-Id: I154af13cedad41b7ce411964dcedce519d102632 --- tensorflow/compiler/xla/service/gpu/ir_emitter.cc | 14 ++++++++------ third_party/llvm/workspace.bzl | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tensorflow/compiler/xla/service/gpu/ir_emitter.cc b/tensorflow/compiler/xla/service/gpu/ir_emitter.cc index 69d3faa3776..dd048cbf7ff 100644 --- a/tensorflow/compiler/xla/service/gpu/ir_emitter.cc +++ b/tensorflow/compiler/xla/service/gpu/ir_emitter.cc @@ -299,6 +299,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation( (f64_atomic_add_supported && element_type == F64); if (atomic_add_supported) { AtomicRMW(llvm::AtomicRMWInst::FAdd, output_address, source, + llvm::MaybeAlign(), llvm::AtomicOrdering::SequentiallyConsistent); return true; } @@ -307,6 +308,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation( if (is_atomic_integral) { // integral + integral AtomicRMW(llvm::AtomicRMWInst::Add, output_address, source, + llvm::MaybeAlign(), llvm::AtomicOrdering::SequentiallyConsistent); return true; } @@ -318,7 +320,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation( auto opcode = primitive_util::IsSignedIntegralType(element_type) ? llvm::AtomicRMWInst::Max : llvm::AtomicRMWInst::UMax; - AtomicRMW(opcode, output_address, source, + AtomicRMW(opcode, output_address, source, llvm::MaybeAlign(), llvm::AtomicOrdering::SequentiallyConsistent); return true; } @@ -328,7 +330,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation( auto opcode = primitive_util::IsSignedIntegralType(element_type) ? llvm::AtomicRMWInst::Min : llvm::AtomicRMWInst::UMin; - AtomicRMW(opcode, output_address, source, + AtomicRMW(opcode, output_address, source, llvm::MaybeAlign(), llvm::AtomicOrdering::SequentiallyConsistent); return true; } @@ -476,10 +478,10 @@ Status IrEmitter::EmitAtomicOperationUsingCAS(const HloComputation& computation, // Emit code to perform the atomicCAS operation // (cas_old_output, success) = atomicCAS(memory_address, cas_old_output, // cas_new_output); - llvm::Value* ret_value = - AtomicCmpXchg(atomic_memory_address, cas_old_output, cas_new_output, - llvm::AtomicOrdering::SequentiallyConsistent, - llvm::AtomicOrdering::SequentiallyConsistent); + llvm::Value* ret_value = AtomicCmpXchg( + atomic_memory_address, cas_old_output, cas_new_output, llvm::MaybeAlign(), + llvm::AtomicOrdering::SequentiallyConsistent, + llvm::AtomicOrdering::SequentiallyConsistent); // Extract the memory value returned from atomicCAS and store it as // cas_old_output. diff --git a/third_party/llvm/workspace.bzl b/third_party/llvm/workspace.bzl index 5f50493aadf..f4dddd974a8 100644 --- a/third_party/llvm/workspace.bzl +++ b/third_party/llvm/workspace.bzl @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" - LLVM_COMMIT = "5d64dd8e3c22e12e4f7b3d08ffe88fc41e727117" - LLVM_SHA256 = "19131ecf82681acec18780a6b9dbe2412e35132ccab104074951b6d50407d08d" + LLVM_COMMIT = "bf6380c0966b26a2aec7f2072efd0a1a9b6328f2" + LLVM_SHA256 = "b225983215a6ba47cbc344df25c158c60baf8cf2cfe5e990e13e028f7ff6dcdc" tf_http_archive( name = name,