From 5e4573fb91d6b3354034bb4b58d9252d4cb8caa2 Mon Sep 17 00:00:00 2001 From: Alex Baden Date: Tue, 10 Oct 2023 03:04:11 +0000 Subject: [PATCH] Update to LLVM 16 --- docker/Dockerfile | 12 ++++++------ docker/Dockerfile.l0 | 2 +- omniscidb/QueryEngine/Compiler/HelperFunctions.cpp | 5 ++++- omniscidb/Tests/L0MgrExecuteTest.cpp | 4 +++- omniscidb/scripts/mapd-deps-conda-dev-env.yml | 8 ++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8395447dc..51343fad1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,15 +31,15 @@ RUN apt-get update && apt-get install -y \ # LLVM RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ apt-add-repository \ - 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' && \ + 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' && \ apt-get update && apt-get install -y \ - llvm-15 \ - llvm-15-dev \ - clang-15 \ - libclang-15-dev \ + llvm-16 \ + llvm-16-dev \ + clang-16 \ + libclang-16-dev \ -- -ENV PATH=/usr/lib/llvm-15/bin${PATH:+:${PATH}} +ENV PATH=/usr/lib/llvm-16/bin${PATH:+:${PATH}} # Dependencies RUN apt-get update && apt-get install -y \ diff --git a/docker/Dockerfile.l0 b/docker/Dockerfile.l0 index 09144a66e..9a20d8974 100644 --- a/docker/Dockerfile.l0 +++ b/docker/Dockerfile.l0 @@ -12,7 +12,7 @@ RUN mkdir /intel-gpu-drivers && cd /intel-gpu-drivers && \ RUN cd /intel-gpu-drivers && dpkg -i *.deb -RUN git clone -b llvm_release_150 https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git && \ +RUN git clone -b llvm_release_160 https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git && \ mkdir SPIRV-LLVM-Translator/build && cd SPIRV-LLVM-Translator/build && \ cmake -Wno-dev .. && make llvm-spirv -j`nproc` && make install diff --git a/omniscidb/QueryEngine/Compiler/HelperFunctions.cpp b/omniscidb/QueryEngine/Compiler/HelperFunctions.cpp index aa45067c1..cd0b28a56 100644 --- a/omniscidb/QueryEngine/Compiler/HelperFunctions.cpp +++ b/omniscidb/QueryEngine/Compiler/HelperFunctions.cpp @@ -55,7 +55,10 @@ namespace compiler { std::string mangle_spirv_builtin(const llvm::Function& func) { CHECK(func.getName().startswith("__spirv_")) << func.getName().str(); std::string new_name; -#if LLVM_VERSION_MAJOR > 14 +#if LLVM_VERSION_MAJOR > 15 + llvm::mangleOpenClBuiltin(func.getName().str(), func.getArg(0)->getType(), new_name); + +#elif LLVM_VERSION_MAJOR > 14 mangleOpenClBuiltin( func.getName().str(), func.getArg(0)->getType(), /*pointer_types=*/{}, new_name); #else diff --git a/omniscidb/Tests/L0MgrExecuteTest.cpp b/omniscidb/Tests/L0MgrExecuteTest.cpp index c5e668932..78759c314 100644 --- a/omniscidb/Tests/L0MgrExecuteTest.cpp +++ b/omniscidb/Tests/L0MgrExecuteTest.cpp @@ -156,7 +156,9 @@ std::unique_ptr read_gen_module_from_bc(const std::string& bc_file std::string mangle_spirv_builtin(const llvm::Function& func) { CHECK(func.getName().startswith("__spirv_")); std::string new_name; -#if LLVM_VERSION_MAJOR > 14 +#if LLVM_VERSION_MAJOR > 15 + llvm::mangleOpenClBuiltin(func.getName().str(), func.getArg(0)->getType(), new_name); +#elif LLVM_VERSION_MAJOR > 14 mangleOpenClBuiltin( func.getName().str(), func.getArg(0)->getType(), /*pointer_types=*/{}, new_name); #else diff --git a/omniscidb/scripts/mapd-deps-conda-dev-env.yml b/omniscidb/scripts/mapd-deps-conda-dev-env.yml index 2f668f6a2..df38f17c1 100644 --- a/omniscidb/scripts/mapd-deps-conda-dev-env.yml +++ b/omniscidb/scripts/mapd-deps-conda-dev-env.yml @@ -20,7 +20,7 @@ dependencies: - arrow-cpp 11.0 - pyarrow 11.0 - pandas 1.5.3 - - llvmdev 15.* + - llvmdev 16.* - openjdk 20.* - cmake - tbb-devel @@ -29,7 +29,7 @@ dependencies: - fmt - maven - boost-cpp - - clangdev 15.* + - clangdev 16.* - llvm - double-conversion - snappy @@ -45,8 +45,8 @@ dependencies: # when cuda is enabled, install also # - arrow-cpp=11.0=*cuda - binutils - - llvm-spirv 15.0.* - - libllvmspirv 15.0.* + - llvm-spirv 16.0.* + - libllvmspirv 16.0.* - folly 2022.11.07.00 - sqlite 3.40.0 - python 3.9.*