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

Builds of Velox fail in system with ARM-SVE but Builds of Gluten do not #8423

Open
ajeyabsfujitsu opened this issue Jan 4, 2025 · 7 comments
Labels

Comments

@ajeyabsfujitsu
Copy link

Problem description

While building Velox on a system with ARM-SVE, the build fails due to a lack of explicit support for SVE in Velox, which is understandable since Velox's documentation does not mention SVE support.

However, when using Gluten, which relies on Velox as its backend, the build does not fail, even though no SVE-related code exists in Gluten itself.

I would like to know these:

  1. Why does Gluten not fail to build when Velox (the backend) does, given the same system configuration?
  2. If SVE-related optimizations are added to Gluten code repo, would the build still succeed, or would it encounter issues due to Velox's lack of support for SVE?

System information

Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: ARM
Model: 1
Thread(s) per core: 1
Core(s) per socket: 16
Socket(s): 1
Stepping: r1p1
BogoMIPS: 2100.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha51
2 sve asimdfhm dit uscat ilrcpc flagm ssbs paca pacg dcpodp svei
8mm svebf16 i8mm bf16 dgh rng

Gluten Version: 1.3.0-SNAPSHOT
Commit: Not in a git repo.
CMake Version: 3.28.3
System: Linux-6.8.0-1021-aws
Arch: aarch64
CPU Name:
C++ Compiler: /usr/bin/c++
C++ Compiler Version: 11.4.0
C Compiler: /usr/bin/cc
C Compiler Version: 11.4.0
CMake Prefix Path: /usr/local;/usr;/;/usr/local/lib/python3.10/dist-packages/cmake/data;/usr/local;/usr/X11R6;/usr/pkg;/opt

CMake log

No response

@FelixYBW
Copy link
Contributor

FelixYBW commented Jan 4, 2025

Gluten's build flag is different from Velox's default one, we modified it. You may compare the gcc flags of the same file which fails in Velox but successes in Gluten.

If you add SVE code to Gluten, you need to add #ifdef SVE to make sure the non-SVE build can success.

@ajeyabsfujitsu
Copy link
Author

ajeyabsfujitsu commented Jan 6, 2025

@FelixYBW could you please tell me where these flags have been modified? Should I reference CMakeLists file?

@FelixYBW
Copy link
Contributor

FelixYBW commented Jan 6, 2025

@FelixYBW could you please tell me where these flags have been modified? Should I reference CMakeLists file?

I don't know the specific flags. I think the easiest way is to output the gcc flags during you build Gluten and Velox then compare the two. You may get the flag by setting CMAKE_EXPORT_COMPILE_COMMANDS

@ajeyabsfujitsu
Copy link
Author

@FelixYBW I tried generating flags for Velox and Gluten both from compile_commands.json file. The mismatch seems to be huge, as in, Velox has a lot of flags. Do you see any major difference I should look out for in the two files attached?
velox_flags.txt
gluten_flags.txt

@FelixYBW
Copy link
Contributor

FelixYBW commented Jan 6, 2025

@FelixYBW I tried generating flags for Velox and Gluten both from compile_commands.json file. The mismatch seems to be huge, as in, Velox has a lot of flags. Do you see any major difference I should look out for in the two files attached?

Below flags are set in your velox build but not defined in Gluten. Which means Gluten doesn't enable these support. It's the reason.

-DARM_FEATURES
-DARM_NEON_ADLER32
-DARM_NEON_CHUNKSET
-DARM_NEON_SLIDEHASH
-DARM_ACLE_CRC_HASH
-DARM_AUXV_HAS_CRC32

@FelixYBW
Copy link
Contributor

FelixYBW commented Jan 6, 2025

@zhouyuan Looks we have many flags not defined, some one like CTZ is useful. Do you know where we disable them?

-DHAVE_BUILTIN_CTZ
-DHAVE_BUILTIN_CTZLL
-DHAVE_POSIX_MEMALIGN
-DHAVE_VISIBILITY_HIDDEN
-DHAVE_VISIBILITY_INTERNAL
-DOPENSSL_BACKEND_USED
-DUNALIGNED64_OK
-DUNALIGNED_OK
-DWITH_GZFILEOP
-DZLIB_COMPAT

@ajeyabsfujitsu Thank you for your dumped configs. It's the first time I carefully compare the difference.

@ajeyabsfujitsu
Copy link
Author

@FelixYBW I tried generating flags for Velox and Gluten both from compile_commands.json file. The mismatch seems to be huge, as in, Velox has a lot of flags. Do you see any major difference I should look out for in the two files attached?

Below flags are set in your velox build but not defined in Gluten. Which means Gluten doesn't enable these support. It's the reason.

-DARM_FEATURES -DARM_NEON_ADLER32 -DARM_NEON_CHUNKSET -DARM_NEON_SLIDEHASH -DARM_ACLE_CRC_HASH -DARM_AUXV_HAS_CRC32

Got it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants