From 3230523432dbd5bfc13f603990883309ebf24c72 Mon Sep 17 00:00:00 2001 From: meiravgri Date: Tue, 17 Dec 2024 09:24:04 +0000 Subject: [PATCH 1/4] override _mm256_loadu_epi8 with mm256_maskz_loadu_epi8 if gcc < 11 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95483 --- .github/workflows/flow-temp.yml | 22 +++++++++++----------- src/VecSim/spaces/space_includes.h | 3 +++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/flow-temp.yml b/.github/workflows/flow-temp.yml index fa35dd541..5cedd8d01 100644 --- a/.github/workflows/flow-temp.yml +++ b/.github/workflows/flow-temp.yml @@ -9,13 +9,13 @@ name: temporary testing on: push: - branches-ignore: ['**'] # ignore all branches. Comment this line to run your workflow below on every push. + # branches-ignore: ['**'] # ignore all branches. Comment this line to run your workflow below on every push. jobs: - jammy: - uses: ./.github/workflows/task-unit-test.yml - with: - container: ubuntu:jammy - run-valgrind: true + # jammy: + # uses: ./.github/workflows/task-unit-test.yml + # with: + # container: ubuntu:jammy + # run-valgrind: true # alpine3: # uses: ./.github/workflows/task-unit-test.yml # with: @@ -32,11 +32,11 @@ jobs: # with: # container: ubuntu:focal # run-valgrind: false - # bullseye: - # uses: ./.github/workflows/task-unit-test.yml - # with: - # container: debian:bullseye - # run-valgrind: false + bullseye: + uses: ./.github/workflows/task-unit-test.yml + with: + container: debian:bullseye + run-valgrind: false # amazonlinux2: # uses: ./.github/workflows/task-unit-test.yml # with: diff --git a/src/VecSim/spaces/space_includes.h b/src/VecSim/spaces/space_includes.h index e7fe6163c..3731584ad 100644 --- a/src/VecSim/spaces/space_includes.h +++ b/src/VecSim/spaces/space_includes.h @@ -16,6 +16,9 @@ #if defined(__AVX512F__) || defined(__AVX__) || defined(__SSE__) #if defined(__GNUC__) #include +#if (__GNUC__ < 11) +#define _mm256_loadu_epi8(ptr) mm256_maskz_loadu_epi8(~0, ptr) +#endif #elif defined(__clang__) #include #elif defined(_MSC_VER) From b6c713a81bc4cceeef96e8e1994ee0b57cae59b4 Mon Sep 17 00:00:00 2001 From: meiravgri Date: Tue, 17 Dec 2024 09:34:23 +0000 Subject: [PATCH 2/4] fix --- src/VecSim/spaces/space_includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VecSim/spaces/space_includes.h b/src/VecSim/spaces/space_includes.h index 3731584ad..f63797b2e 100644 --- a/src/VecSim/spaces/space_includes.h +++ b/src/VecSim/spaces/space_includes.h @@ -17,7 +17,7 @@ #if defined(__GNUC__) #include #if (__GNUC__ < 11) -#define _mm256_loadu_epi8(ptr) mm256_maskz_loadu_epi8(~0, ptr) +#define _mm256_loadu_epi8(ptr) _mm256_maskz_loadu_epi8(~0, ptr) #endif #elif defined(__clang__) #include From 7597870388faa804fe27e27cf3dcac1b645ede22 Mon Sep 17 00:00:00 2001 From: meiravgri Date: Tue, 17 Dec 2024 09:45:09 +0000 Subject: [PATCH 3/4] disable flow temp --- .github/workflows/flow-temp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flow-temp.yml b/.github/workflows/flow-temp.yml index 5cedd8d01..b6b0de1ca 100644 --- a/.github/workflows/flow-temp.yml +++ b/.github/workflows/flow-temp.yml @@ -9,7 +9,7 @@ name: temporary testing on: push: - # branches-ignore: ['**'] # ignore all branches. Comment this line to run your workflow below on every push. + branches-ignore: ['**'] # ignore all branches. Comment this line to run your workflow below on every push. jobs: # jammy: # uses: ./.github/workflows/task-unit-test.yml From 393c2592e833261d4fdafaa1e1bc3a1dcdb49af8 Mon Sep 17 00:00:00 2001 From: meiravgri Date: Tue, 17 Dec 2024 09:56:45 +0000 Subject: [PATCH 4/4] add comment --- src/VecSim/spaces/space_includes.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/VecSim/spaces/space_includes.h b/src/VecSim/spaces/space_includes.h index f63797b2e..9a5ace731 100644 --- a/src/VecSim/spaces/space_includes.h +++ b/src/VecSim/spaces/space_includes.h @@ -16,6 +16,9 @@ #if defined(__AVX512F__) || defined(__AVX__) || defined(__SSE__) #if defined(__GNUC__) #include +// Override missing implementations in GCC < 11 +// Full list and suggested alternatives for each missing function can be found here: +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95483 #if (__GNUC__ < 11) #define _mm256_loadu_epi8(ptr) _mm256_maskz_loadu_epi8(~0, ptr) #endif