Comments (12)
It is missing the fix that was included into the merged pr in the develop branch.
It won't have the additional code that searches for the flags in the auto detected arch flag so the failure is the same as previously I believe.
Just that section alone won't fix it.
from vectorscan.
My naive recommendation is just to remove the code adding the flags, as well as failing the build if SVE2 was requested but it is not available.
git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb4ba80..30a4321 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,16 +228,6 @@ if (ARCH_IA32 OR ARCH_X86_64)
endif()
endif()
-if (ARCH_AARCH64)
- if (BUILD_SVE2_BITPERM)
- set(GNUCC_ARCH "${GNUCC_ARCH}+sve2-bitperm")
- elseif (BUILD_SVE2)
- set(GNUCC_ARCH "${GNUCC_ARCH}+sve2")
- elseif (BUILD_SVE)
- set(GNUCC_ARCH "${GNUCC_ARCH}+sve")
- endif ()
-endif(ARCH_AARCH64)
-
message(STATUS "ARCH_C_FLAGS : ${ARCH_C_FLAGS}")
message(STATUS "ARCH_CXX_FLAGS : ${ARCH_CXX_FLAGS}")
diff --git a/cmake/arch.cmake b/cmake/arch.cmake
index 29c39b4..02fc8d4 100644
--- a/cmake/arch.cmake
+++ b/cmake/arch.cmake
@@ -188,6 +188,15 @@ else (NOT FAT_RUNTIME)
if (ARCH_PPPC64EL AND NOT HAVE_VSX)
message(FATAL_ERROR "VSX support required for Power support")
endif ()
+ if (BUILD_SVE1 AND NOT HAVE_SVE1)
+ message(FATAL_ERROR "SVE1 support not avaliable on this system")
+ endif ()
+ if (BUILD_SVE2 AND NOT HAVE_SVE2)
+ message(FATAL_ERROR "SVE2 support not avaliable on this system")
+ endif ()
+ if (BUILD_SVE2_BITPERM AND NOT HAVE_SVE2_BITPERM)
+ message(FATAL_ERROR "SVE2_BITPERM support not avaliable on this system")
+ endif ()
endif ()
from vectorscan.
The third issue is that the march flag is not checked after the new flags are appended and the failure appears to be from the sqlite version check.
from vectorscan.
@mddirba right, this must be on actual hardware, my tests have been only on qemu, where SVE2 autodetection works as I'm building it regularly. I'm not entirely happy with features autodetection in general and I would be more than happy to replace it with something more robust. I will try your suggestion and will probably have a new release soon.
from vectorscan.
any updates?
from vectorscan.
Hi, unfortunately SVE2 support will not change soon, but we will get a Graviton3 system soon so such problems should be fixed and SVE support should be improved.
from vectorscan.
I've been trying on graviton3 ec2 instance and it seems like sve is also not being utilized.
from running perf and disassembly, doesn't look like sve is being utilized when building with -DBUILD_SVE=1.
Is this what you're referring to in the "SVE support should be improved" part of your reply?
from vectorscan.
keep in mind that SVE support has only been added in a couple specific modules as a PoC and not everywhere. I have done multiple tests on qemu and SVE does work there. Most likely SVE detection and enablement is done incorrectly on actual hardware, hence the problems.
from vectorscan.
Hi @mddirba, SVE support has just been enabled in recent merged PR #125. Would you mind testing current develop branch on SVE2 hardware, as I'm preparing a new release and it would be best to include any minor fixes for SVE2 now, otherwise it will have to be fixed afterwards.
from vectorscan.
CMakeLists.txt still attempts to append to -march so this code will not compile on N2.
if (ARCH_AARCH64)
if (BUILD_SVE2_BITPERM AND NOT SVE2_BITPERM_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2-bitperm")
elseif (BUILD_SVE2 AND NOT SVE2_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2")
elseif (BUILD_SVE AND NOT SVE_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve")
endif ()
endif(ARCH_AARCH64)
/usr/bin/cmake --prefix=/usr/local -DBUILD_SVE2=1 -DBUILD_SVE2_BITPERM=1 -DCMAKE_INSTALL_PREFIX=/usr/local -DFAT_RUNTIME=off -DBOOST_ROOT=/bmark/snort/0/source/boost/ -DCMAKE_BUILD_TYPE=Release /bmark/snort/0/source/hyperscan '-DCMAKE_C_FLAGS=-m
arch=native -mtune=native' '-DCMAKE_CXX_FLAGS=-march=native -mtune=native'
-- Build type RELEASE
-- using release build
-- Boost version: 1.77.0
-- Build date: 2022-09-19
-- Building static libraries
-- gcc version 10.3.0
-- ARCH_FLAG 'march' '', TUNE_FLAG 'mtune' ''
-- ARCH_FLAG 'march' 'armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres', TUNE_FLAG 'mtune' 'neoverse-n2'
-- gcc will tune for armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres, neoverse-n2
-- ARCH_C_FLAGS :
-- ARCH_CXX_FLAGS :
-- g++ version 10.3.0
CMake Error at CMakeLists.txt:371 (message):
arm_sve.h is required to build for SVE.
-- Configuring incomplete, errors occurred!
See also "/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeOutput.log".
See also "/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeError.log".
root@cn106a0crbr1-438:~# FLAG="-mcpu=neoverse-n2" /usr/bin/cmake --prefix=/usr/local -DBUILD_SVE2=1 -DBUILD_SVE2_BITPERM=1 -DCMAKE_INSTALL_PREFIX=/usr/local -DFAT_RUNTIME=off -DBOOST_ROOT=/bmark/snort/0/source/boost/ -DCMAKE_BUILD_TYPE=Release /bmark/snort/0/source/hype
rscan "-DCMAKE_C_FLAGS=${FLAG}" "-DCMAKE_CXX_FLAGS=${FLAG}"
-- Build type RELEASE
-- using release build
-- Boost version: 1.77.0
-- Build date: 2022-09-19
-- Building static libraries
-- gcc version 10.3.0
-- ARCH_FLAG 'march' '', TUNE_FLAG 'mtune' ''
-- ARCH_FLAG 'march' 'armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres', TUNE_FLAG 'mtune' 'neoverse-n2'
-- gcc will tune for armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres, neoverse-n2
-- ARCH_C_FLAGS :
-- ARCH_CXX_FLAGS :
-- g++ version 10.3.0
CMake Error at CMakeLists.txt:371 (message):
arm_sve.h is required to build for SVE.
-- Configuring incomplete, errors occurred!
See also "/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeOutput.log".
See also "/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeError.log".
tail -n21 /bmark/snort/0/source/hyperscan/CMakeFiles/CMakeError.log
Source file was:
#if !defined(PPC64) && !(defined(LITTLE_ENDIAN) && defined(VSX))
#error not ppc64el
#endif
int main(void) { return 0; }
Determining if the include file arm_sve.h exists failed with the following output:
Change Dir: /bmark/snort/0/source/hyperscan/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_cc705/fast && /usr/bin/make -f CMakeFiles/cmTC_cc705.dir/build.make CMakeFiles/cmTC_cc705.dir/build
make[1]: Entering directory '/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_cc705.dir/CheckIncludeFile.cxx.o
/usr/bin/c++ -march=native -mtune=native -march=armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres+sve2-bitperm -mtune=neoverse-n2 -o CMakeFiles/cmTC_cc705.dir/CheckIncludeFile.cxx.o -c /bmark/snort/0/source/hyperscan/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
Assembler messages:
Error: must specify extensions to add before specifying those to remove
Error: unrecognized option -march=armv8.5-a+crypto+rcpc+sve2-sm4+sve2-aes+sve2-sha3+sve2-bitperm+nopredres+sve2-bitperm
make[1]: *** [CMakeFiles/cmTC_cc705.dir/build.make:66: CMakeFiles/cmTC_cc705.dir/CheckIncludeFile.cxx.o] Error 1
make[1]: Leaving directory '/bmark/snort/0/source/hyperscan/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_cc705/fast] Error 2
from vectorscan.
Right, I'm afraid I cannot guess what the problem is, I expected it to behave similarly to SVE, but apparently there is a catch. One suggestion, could you please try replacing that block with this:
if (ARCH_AARCH64)
if (BUILD_SVE2_BITPERM AND NOT SVE2_BITPERM_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2-bitperm")
endif()
if (BUILD_SVE2 AND NOT SVE2_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2")
endif()
if (BUILD_SVE AND NOT SVE_FOUND)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve")
endif ()
endif(ARCH_AARCH64)```
and retry?
from vectorscan.
This has been fixed in #131 . Enabling SVE2 on eg. Yitian:
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SVE=on -DBUILD_SVE2=on -DBUILD_SVE2_BITPERM=on ..
from vectorscan.
Related Issues (20)
- Report nested character classes as invalid
- Enable Fat Runtime by default on x86 to help migration from Hyperscan. HOT 6
- Compile error with fat runtime on gcc 13.2 HOT 5
- Compile error on armv7-a and cortex-a7 or cortex-a15. HOT 3
- Add cppcheck & clang-tidy to CI HOT 2
- Add clang-format to CI to enforce consistent formatting
- Add SVE to LimEx Shuffle
- Add 32+ Byte version of Sheng on ARM HOT 1
- Missing Sheng microbenchmark
- Refactor Dispatcher to use function table instead of macro
- Combo pattern fails when operands set singlematch flag and/or max_offset HOT 4
- Wrong web site URL in this GitHub repo HOT 1
- Enable FreeBSD support
- unit-internal and unit-hyperscan segfault on FreeBSD/ppc64le HOT 1
- cmake on FreeBSD does not appear to always detect ccache HOT 1
- gcc-14 compilation failure for AVX512
- XCode Generator in CMake Not Working HOT 2
- Fix all errors/warnings found by CPPcheck
- Fix all errors/warnings found by Clang-tidy HOT 1
- Vectorscan Packages for Ubuntu 24.04 AMD64 not available HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vectorscan.