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

Upgrade half library to 2.2 #755

Closed
wants to merge 1 commit into from

Conversation

espadrine
Copy link
Contributor

@espadrine espadrine commented Feb 4, 2023

Compiling with
cmake . -DUSE_BACKEND=CUDA -DCMAKE_CXX_FLAGS='-march=native' on a CPU with F16C intrinsics yielded the same errors as issue #387:

error: ‘_mm_set_ss’ was not declared in this scope

The cause is that _mm_set_ss is defined in a header imported from immintrin.h, which is included in
cpp/external/half-2.1.0/include/half.hpp:272.

However, it is only included if the preprocessor macro HALF_ENABLE_F16C_INTRINSICS is set, but in turn, that is only set in cpp/external/half-2.1.0/include/half.hpp:283, a few lines too late.

This issue seems fixed in half-2.2.0, thus we upgrade to it.

I compiled and ran the new code in GTP against Sabaki and played a game without issue.

Compiling with
`cmake . -DUSE_BACKEND=CUDA -DCMAKE_CXX_FLAGS='-march=native'`
on a CPU with F16C intrinsics yielded the same errors as issue lightvector#387:

> error: ‘_mm_set_ss’ was not declared in this scope

The cause is that _mm_set_ss is defined in a header imported from
immintrin.h, which is included in
cpp/external/half-2.1.0/include/half.hpp:272.

However, it is only included if the preprocessor macro
HALF_ENABLE_F16C_INTRINSICS is set, but in turn, that is only set in
cpp/external/half-2.1.0/include/half.hpp:283, a few lines too late.

This issue seems fixed in half-2.2.0, thus we upgrade to it.
@lightvector
Copy link
Owner

Thanks! Manually rebased and merged into master as 3dd5999 along with some followup changes 2f7a95f a5cd339 to reduce the whitespace diff and to reapply local changes to make compiler warnings happy.

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.

None yet

2 participants