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

SSE Check Failing on android/aarch64 #629

Open
danieldjewell opened this issue Jul 15, 2020 · 1 comment
Open

SSE Check Failing on android/aarch64 #629

danieldjewell opened this issue Jul 15, 2020 · 1 comment

Comments

@danieldjewell
Copy link

Hello!

The check for sse2 (lines below) is failing on android/aarch64 (specifically Termux on Android). It incorrectly detects that SSE2 is available (which is most certainly is not). I suspect the problem lies in using clang-9 vs gcc-9...

I tested on an RPi running linux (aarch64) with GCC-9 and it seemed to detect properly.

dmlc-core/CMakeLists.txt

Lines 187 to 190 in ebcaa42

else()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
check_cxx_compiler_flag("-msse2" SUPPORT_MSSE2)
if(SUPPORT_MSSE2)

Likewise, the Makefile makes an implicit assumption that one is running on Intel.

dmlc-core/Makefile

Lines 20 to 27 in ebcaa42

ifndef USE_SSE
USE_SSE = 1
endif
ifeq ($(USE_SSE), 1)
CFLAGS += -msse2
endif

This is in stark contrast to rabit where at least in the Makefile it detects architectures (although, I would argue that the detection logic should really be the other way around: if the detected ARCH is Intel, then + -msse2; else: -march=native)

https://github.com/dmlc/rabit/blob/74bf00a5ab4594f1695a8ea960394ce89f4a44d0/Makefile#L20-L25

@hcho3
Copy link
Contributor

hcho3 commented Jul 15, 2020

Are you cross-compiling to aarch64? The check_cxx_compiler_flag() macro attempts to compile with -msse2. If the host supports -msse2 but the target does not, we'd have an issue.

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

No branches or pull requests

2 participants