Skip to content

[GLUTEN-11390][VL] Align aarch64 compiler flags with Velox to fix xsimd initialization errors#11457

Merged
zhouyuan merged 2 commits intoapache:mainfrom
xumanbu:GLUTEN-11390
Jan 23, 2026
Merged

[GLUTEN-11390][VL] Align aarch64 compiler flags with Velox to fix xsimd initialization errors#11457
zhouyuan merged 2 commits intoapache:mainfrom
xumanbu:GLUTEN-11390

Conversation

@xumanbu
Copy link
Contributor

@xumanbu xumanbu commented Jan 21, 2026

What changes are proposed in this pull request?

fix: #11390

Follow Velox's ARM CPU detection logic to ensure consistent compiler flags, between Gluten and Velox, preventing xsimd initialization issues.See: ep/build-velox/build/velox_ep/scripts/setup-helper-functions.sh:142-180

How was this patch tested?

build test

@github-actions github-actions bot added the BUILD label Jan 21, 2026
@xumanbu
Copy link
Contributor Author

xumanbu commented Jan 21, 2026

@PHILO-HE PTAL

Copy link
Member

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

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

Looks good. cc @zhouyuan

Copy link
Member

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

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

Two minor comments. Thanks.

"aarch64")
echo -n "-mcpu=neoverse-n1 -std=c++20 $ADDITIONAL_FLAGS"
# Follow Velox's ARM CPU detection logic to ensure consistent compiler flags
# between Gluten and Velox, preventing xsimd initialization issues.
Copy link
Member

Choose a reason for hiding this comment

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

Suggest adding the issue to make it clear to developers.
preventing xsimd initialization issues, see GLUTEN-11390.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

echo -n "-mcpu=neoverse-n1 -std=c++20 $ADDITIONAL_FLAGS"
# Follow Velox's ARM CPU detection logic to ensure consistent compiler flags
# between Gluten and Velox, preventing xsimd initialization issues.
# See: ep/build-velox/build/velox_ep/scripts/setup-helper-functions.sh:142-180
Copy link
Member

Choose a reason for hiding this comment

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

Nit: The line numbers can be invalid very likely during Velox's iteration. Suggest the following comment.

Reference: function get_cxx_flags in Velox's setup-helper-functions.sh.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, I'll modify it.

@zhouyuan
Copy link
Member

dev/build-helper-functions.sh seems duplicated with Velox - could we use the one in Velox repo?

@xumanbu
Copy link
Contributor Author

xumanbu commented Jan 23, 2026

dev/build-helper-functions.sh seems duplicated with Velox - could we use the one in Velox repo?

@zhouyuan gluten have specific functions like setup_macos/setup_linux that aren't in Velox's version, and velox's get_cxx_flags returns only base flags (e.g., -mcpu=neoverse-n1) without these additional flags.
they don't look exactly the same, I think it is better to remain independent at now.

@zhouyuan zhouyuan merged commit 3676fa5 into apache:main Jan 23, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][VL] Inconsistent C++ Compiler Flags for aarch64 Causing xsimd initialization errors

3 participants