From 46550ab18e8f7314107cf591b9cf902b290fd45d Mon Sep 17 00:00:00 2001 From: Aliia Khasanova <40315403+khasanovaa@users.noreply.github.com> Date: Fri, 30 Aug 2024 07:16:34 +0200 Subject: [PATCH] [BACKEND] Update LLVM version to https://github.com/llvm/llvm-project/commit/1115dee248e68a155001ac3712a189299d104863 (#4537) 1. Updated llvm version up to 1115dee248e68a155001ac3712a189299d104863 2. Included fixes that are required to the codebase to correspond the new version 3. Fixed naming and version of gcc package --------- Co-authored-by: Tori Baker Co-authored-by: Goran Flegar Co-authored-by: Florian Reichl <63750742+reichlfl@users.noreply.github.com> Co-authored-by: Pablo Zimmermann Co-authored-by: Christian Sigg --- .github/workflows/llvm-build.yml | 4 ++-- cmake/llvm-hash.txt | 2 +- .../amd/lib/TritonAMDGPUToLLVM/BuiltinFuncToLLVM.cpp | 2 +- third_party/amd/python/triton_amd.cc | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/llvm-build.yml b/.github/workflows/llvm-build.yml index b3b7fffae40e..4e944acbeb4a 100644 --- a/.github/workflows/llvm-build.yml +++ b/.github/workflows/llvm-build.yml @@ -159,8 +159,8 @@ jobs: cp -r /usr/aarch64-linux-gnu/lib ./arm-sysroot cp -r /usr/aarch64-linux-gnu/include ./arm-sysroot LINKER=$(pwd)/arm-sysroot/lib/ld-linux-aarch64.so.1 - wget http://ftp.de.debian.org/debian/pool/main/g/gcc-defaults/gcc-aarch64-linux-gnu_13.2.0-7_amd64.deb - dpkg-deb -x gcc-aarch64-linux-gnu_13.2.0-7_amd64.deb ./arm-sysroot + wget http://ftp.de.debian.org/debian/pool/main/g/gcc-defaults/gcc-aarch64-linux-gnu_14.1.0-2_amd64.deb + dpkg-deb -x gcc-aarch64-linux-gnu_14.1.0-2_amd64.deb ./arm-sysroot export LD_LIBRARY_PATH=$(pwd)/arm-sysroot/lib:$LD_LIBRARY_PATH sudo ln -s $LINKER /lib/ld-linux-aarch64.so.1 SYSROOT="$(pwd)/arm-sysroot" diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index 1522498c600e..e86248fa1a3d 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -ce80c80dca45c7b4636a3e143973e2c6cbdb2884 +1115dee248e68a155001ac3712a189299d104863 diff --git a/third_party/amd/lib/TritonAMDGPUToLLVM/BuiltinFuncToLLVM.cpp b/third_party/amd/lib/TritonAMDGPUToLLVM/BuiltinFuncToLLVM.cpp index 99dad006dba3..3c429a3d724a 100644 --- a/third_party/amd/lib/TritonAMDGPUToLLVM/BuiltinFuncToLLVM.cpp +++ b/third_party/amd/lib/TritonAMDGPUToLLVM/BuiltinFuncToLLVM.cpp @@ -128,7 +128,7 @@ class CallOpConversion : public mlir::RewritePattern { auto operands = callOp.getOperands(); auto result = callOp.getResult(); - LLVM::LLVMFunctionType calleeType = callOp.getCalleeType().value(); + LLVM::LLVMFunctionType calleeType = callOp.getCalleeFunctionType(); Type returnType = calleeType.getReturnType(); auto loc = callOp.getLoc(); diff --git a/third_party/amd/python/triton_amd.cc b/third_party/amd/python/triton_amd.cc index f3554d3de5d3..56756b5fed25 100644 --- a/third_party/amd/python/triton_amd.cc +++ b/third_party/amd/python/triton_amd.cc @@ -195,11 +195,9 @@ void init_triton_amd(py::module &&m) { target->createMCCodeEmitter(*mcii, ctx)); std::unique_ptr mab( target->createMCAsmBackend(*sti, *mri, mcOptions)); + std::unique_ptr ow(mab->createObjectWriter(svos)); mcStreamer.reset(target->createMCObjectStreamer( - triple, ctx, std::move(mab), mab->createObjectWriter(svos), - std::move(ce), *sti, mcOptions.MCRelaxAll, - mcOptions.MCIncrementalLinkerCompatible, - /*DWARFMustBeAtTheEnd=*/false)); + triple, ctx, std::move(mab), std::move(ow), std::move(ce), *sti)); std::unique_ptr parser( createMCAsmParser(srcMgr, ctx, *mcStreamer, *mai));