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

cmake change for correct placement of autodetected tune & arch flags of GCC and SVE enablement on AARCH64 #125

Merged
merged 6 commits into from
Sep 19, 2022

Conversation

abondarev84
Copy link

also updated README for SVE short explanation

@abondarev84 abondarev84 marked this pull request as ready for review September 13, 2022 16:26
@markos
Copy link

markos commented Sep 13, 2022

Unfortunately, this fails on all other platforms currently on our Jenkins CI:

https://jenkins.vectorcamp.gr/blue/organizations/jenkins/VectorCamp%2Fvectorscan-ci/detail/vectorscan-ci/109/pipeline (direct URLs fail for Blue Ocean plugin).

If this is to be accepted it has to continue working for all other architectures.

CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@markos
Copy link

markos commented Sep 16, 2022

@abondarev84 By the way, when you are done, could you please submit this PR against develop branch? Thanks.

@abondarev84
Copy link
Author

of course

@abondarev84 abondarev84 changed the base branch from master to develop September 18, 2022 08:59
tune and arch flags will be applied from autodetect only if they have been created by the process, otherwise the old logical flow remains wrt the flags
CMakeLists.txt Show resolved Hide resolved
@markos
Copy link

markos commented Sep 18, 2022

I confirm that it works on my graviton3 system with gcc, unfortunately it fails with clang (tested 11 and 13).

@abondarev84
Copy link
Author

I confirm that it works on my graviton3 system with gcc, unfortunately it fails with clang (tested 11 and 13).

do you mind referencing to what failed? run jenking run 124 is still running without errors so far.

for run 123 I see that sve wasn't found but it wasn't in the flags or cmake command.

@markos
Copy link

markos commented Sep 18, 2022

Jenkins jobs do not run SVE specific builds (yet), it's only NEON. If you try building on graviton3 system with
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SVE=on ..

you will see the error.

@abondarev84
Copy link
Author

Jenkins jobs do not run SVE specific builds (yet), it's only NEON. If you try building on graviton3 system with CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SVE=on ..

you will see the error.

there were no changes to clang logic path.
what I'm seeing as the cause here is that the error of not having arm_sve.h happens for lack of a file identification in the includes.
I can update the commit message to reflect that these fixes were implemented for gcc.

@abondarev84 abondarev84 changed the title cmake change for correct placement of autodetected tune,arch and cpu flags and SVE enablement on AARCH64 cmake change for correct placement of autodetected tune & arch flags of GCC and SVE enablement on AARCH64 Sep 18, 2022
@abondarev84 abondarev84 requested a review from markos September 18, 2022 14:59
@markos
Copy link

markos commented Sep 18, 2022

The problem is that it has to work for clang as well, before it can be merged. I see that clang correctly sets -march=armv8+sve in the CFLAGS/CXXFLAGS, so I'm wondering why it fails to detect arm_sve.h.

@markos
Copy link

markos commented Sep 18, 2022

right, ARCH_C_FLAGS/ARCH_CXX_FLAGS are set correctly, but they are not used in CHECK_INCLUDE_FILE_CXX for clang, which leads to failure.

@markos
Copy link

markos commented Sep 18, 2022

yup, that's it, adding this line before the CHECK_INCLUDE_FILE_CXX, line 361, fixes the build:
set(CMAKE_REQUIRED_FLAGS ${ARCH_CXX_FLAGS})

@markos
Copy link

markos commented Sep 18, 2022

could you also remove Jenkinsfile from the PR? thanks

@abondarev84
Copy link
Author

could you also remove Jenkinsfile from the PR? thanks

I updated my fork, should I remove the merge from remote and leave my repo at my newest commit?
(I can't just remove the file from the pr in githubs ui it seems)

@abondarev84
Copy link
Author

@markos removed the merge from your origin.

@markos
Copy link

markos commented Sep 18, 2022

ok, let's fix the clang issue as mentioned in #125 (comment) and wait for jenkins to be done and it should be good to go :)

@markos markos merged commit 00d1807 into VectorCamp:develop Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants