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

[onert/ggml] Don't specify arch on armv7l linux build #14436

Conversation

glistening
Copy link
Contributor

It removes the specific arch on ggml cross armv7l linux build. Previously, ggml specifies -mfpu=neon-fp-armv8, which may cause illegal instruction signal during running ggml_quantize_row_q8_0, especially compiled with gcc-13 -On, where n = 1,2,3 on odroid xu4. (ARMv7 Cortex-A15).

ONE-DCO-1.0-Signed-off-by: Sanggyu Lee [email protected]

Related: #14391

It removes the specific arch on ggml cross armv7l linux build.
Previously, ggml specifies -mfpu=neon-fp-armv8, which may cause
illegal instruction signal during running ggml_quantize_row_q8_0,
especially compiled with gcc-13 -On, where n = 1,2,3 on odroid xu4.
(ARMv7 Cortex-A15).

ONE-DCO-1.0-Signed-off-by: Sanggyu Lee <[email protected]>
@glistening glistening requested a review from hseok-oh December 9, 2024 03:03
@@ -1098,7 +1098,7 @@ if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR
list(APPEND ARCH_FLAGS -mfpu=neon-vfpv4 -mno-unaligned-access -funsafe-math-optimizations)
else()
# Raspberry Pi 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our target is not Raspberry Pi 2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment about custom fix.

Ex)

# [FIX] Add -fPIC option for static

chunseoklee
chunseoklee previously approved these changes Dec 9, 2024
@glistening glistening force-pushed the dont_use_specific_arch_on_armv7l_ggml_build branch from 35689ed to 849250d Compare December 9, 2024 05:03
Copy link
Contributor

@hseok-oh hseok-oh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glistening
Copy link
Contributor Author

glistening commented Dec 9, 2024

On Ubuntu 24.04 mate:

After this patch,

$ Product/armv7l-linux.release/out/bin/onert_run -r 1 5.circle
Model Filename 5.circle
===================================
MODEL_LOAD   takes 19.119 ms
PREPARE      takes 442.078 ms
EXECUTE      takes 8.801 ms
- MEAN     :  8.801 ms
- MAX      :  8.801 ms
- MIN      :  8.801 ms
- GEOMEAN  :  8.801 ms
===================================

Before

$ Product/armv7l-linux.release/out/bin/onert_run -r 1 5.circle
Model Filename 5.circle
Illegal instruction (core dumped)

@hseok-oh
Copy link
Contributor

hseok-oh commented Dec 9, 2024

I also confirmed this PR working on my environment.

@glistening
Copy link
Contributor Author

@chunseoklee PTAL. Comment is updated as @hseok-oh requested.

@hseok-oh hseok-oh merged commit 9a1731b into Samsung:master Dec 9, 2024
9 checks passed
@glistening glistening deleted the dont_use_specific_arch_on_armv7l_ggml_build branch December 9, 2024 09:26
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.

3 participants