Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SVML patch for LLVM 14 #192

Merged
merged 5 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ if %ERRORLEVEL% neq 0 exit 1
cmake --build .
if %ERRORLEVEL% neq 0 exit 1

REM bin\opt -S -vector-library=SVML -mcpu=haswell -O3 %RECIPE_DIR%\numba-3016.ll | bin\FileCheck %RECIPE_DIR%\numba-3016.ll
REM if %ERRORLEVEL% neq 0 exit 1
:: SVML regression test (cf. #52 and numba/numba#3016)
bin\opt -S -vector-library=SVML -mcpu=haswell -O3 %RECIPE_DIR%\numba-3016.ll | bin\FileCheck %RECIPE_DIR%\numba-3016.ll
if %ERRORLEVEL% neq 0 exit 1

cd ..\llvm\test
..\..\build\bin\llvm-lit.py -vv Transforms ExecutionEngine Analysis CodeGen/X86
3 changes: 2 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ else
fi

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
# bin/opt -S -vector-library=SVML $TEST_CPU_FLAG -O3 $RECIPE_DIR/numba-3016.ll | bin/FileCheck $RECIPE_DIR/numba-3016.ll || exit $?
# SVML regression test (cf. #52 and numba/numba#3016)
bin/opt -S -vector-library=SVML $TEST_CPU_FLAG -O3 $RECIPE_DIR/numba-3016.ll | bin/FileCheck $RECIPE_DIR/numba-3016.ll || exit $?

if [[ "$target_platform" == linux* ]]; then
ln -s $(which $CC) $BUILD_PREFIX/bin/gcc
Expand Down
10 changes: 5 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ source:
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-project-{{ version.replace(".rc", "rc") }}.src.tar.xz
sha256: 8b3cfd7bc695bd6cea0f37f53f0981f34f87496e79e2529874fd03a2f9dd3a8a
patches:
# - patches/intel-D47188-svml-VF.patch # Fixes vectorizer and extends SVML support
# - patches/expect-fastmath-entrypoints-in-add-TLI-mappings.ll.patch # adjusts test added in 10.0.0 for intel-D47188-svml-VF.patch effects
# - patches/amd-roc-2.7.0.diff
- patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch
- patches/no-windows-symlinks.patch
- patches/0001-RuntimeDyld-RuntimeDyldELF-Clear-GOTOffsetMap-when-r.patch
- patches/0002-Always-copy-on-windows.patch
# backport https://reviews.llvm.org/D146938 to unblock numba on aarch
- patches/0003-RuntimeDyld-RuntimeDyldELF-Clear-GOTOffsetMap-when-r.patch
- patches/0004-Fixes-vectorizer-and-extends-SVML-support.patch
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved

build:
number: 3
number: 4
merge_build_host: false

requirements:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 629cea6a21aefda147f674d86a9d9ba550be4e18 Mon Sep 17 00:00:00 2001
From e1ad26b0a967a41b000373af7c25b5ab62b87d4d Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
Date: Tue, 4 Aug 2020 21:06:30 -0500
Subject: [PATCH] pass through QEMU_LD_PREFIX & SDKROOT
Subject: [PATCH 1/4] pass through QEMU_LD_PREFIX & SDKROOT

---
llvm/utils/lit/lit/TestingConfig.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py
index e80369377857..44f5794ed96b 100644
index e803693778..44f5794ed9 100644
--- a/llvm/utils/lit/lit/TestingConfig.py
+++ b/llvm/utils/lit/lit/TestingConfig.py
@@ -21,7 +21,7 @@ class TestingConfig(object):
Expand All @@ -20,6 +20,3 @@ index e80369377857..44f5794ed96b 100644
'CLANG', 'LLDB', 'LD_PRELOAD', 'ASAN_OPTIONS',
'UBSAN_OPTIONS', 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL',
'SSH_AUTH_SOCK', 'SANITIZER_IGNORE_CVE_2016_2143',
--
2.35.3.windows.1

Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
commit 0d6f97c00e78ed4369bd9a642c22cedeaba5fb11
Author: Isuru Fernando <[email protected]>
Date: Tue Nov 8 13:34:20 2022 -0600
From 3369987c6c4d085692e9a8de8df3e689ba0b453a Mon Sep 17 00:00:00 2001
From: Isuru Fernando <[email protected]>
Date: Tue, 8 Nov 2022 13:34:20 -0600
Subject: [PATCH 2/4] Always copy on windows

Always copy on windows

The conda package build machine may have permissions to
create symlinks, but conda doesn't handle symlinks on windows
properly
The conda package build machine may have permissions to
create symlinks, but conda doesn't handle symlinks on windows
properly
---
llvm/cmake/modules/LLVMInstallSymlink.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
index b5c35f706cb7..d63260a62730 100644
index b5c35f706c..d63260a627 100644
--- a/llvm/cmake/modules/LLVMInstallSymlink.cmake
+++ b/llvm/cmake/modules/LLVMInstallSymlink.cmake
@@ -10,10 +10,11 @@ function(install_symlink name target outdir)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2e1b838a889f9793d4bcd5dbfe10db9796b77143 Mon Sep 17 00:00:00 2001
From a0894cfa644fa50242fc655b7d2f8bed43d52f3c Mon Sep 17 00:00:00 2001
From: Graham Markall <[email protected]>
Date: Mon, 3 Apr 2023 11:15:36 -0700
Subject: [PATCH] [RuntimeDyld] RuntimeDyldELF: Clear GOTOffsetMap when
Subject: [PATCH 3/4] [RuntimeDyld] RuntimeDyldELF: Clear GOTOffsetMap when
resetting GOT section.

When the GOT section ID is reset, the GOTOffsetMap must also be cleared,
Expand All @@ -18,17 +18,14 @@ Differential Revision: https://reviews.llvm.org/D146938
1 file changed, 1 insertion(+)

diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 3c7f4ec47eb8..282c357f2de2 100644
index f92618afdf..eb3c27a940 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -2406,6 +2406,7 @@ Error RuntimeDyldELF::finalizeLoad(const ObjectFile &Obj,
@@ -2345,6 +2345,7 @@ Error RuntimeDyldELF::finalizeLoad(const ObjectFile &Obj,
}
}

+ GOTOffsetMap.clear();
GOTSectionID = 0;
CurrentGOTIndex = 0;

--
2.40.0

Loading