Make float16/bfloat16 distinct types#5736
Open
cyyever wants to merge 4 commits into
Open
Conversation
e706f4c to
620fb4a
Compare
Contributor
|
@q10 has imported this pull request. If you are a Meta employee, you can view this in D103884301. |
Contributor
|
@cyyever Looks like there are undefined symbol errors |
620fb4a to
2b887bf
Compare
Contributor
Author
|
@q10 fixed |
2b887bf to
5b37adc
Compare
Contributor
Author
|
@q10 fixed |
5b37adc to
947754b
Compare
Contributor
|
@cyyever looks like there are test errors on aarch64 |
Contributor
Author
|
@q10 fixed the tests by restoring some uint16_t branches to keep this PR small, I will clean up them in later PRs |
00b67be to
f8664a3
Compare
The new struct types for fbgemm::float16/bfloat16 change symbol mangling
of Float16ToFloat_avx2 etc., exposing a latent gap where the
FbgemmFloat16Convert{,Avx2,Avx512}.cc and bf16 counterparts were never
linked into fbgemm_gpu's fbgemm.so. CI now hits an undefined-symbol
error at import time. Add the missing sources to the cmake source list.
Switch from CHECK_SOURCE_RUNS to CHECK_SOURCE_COMPILES so CXX_AVX*_FOUND reflects compiler capability rather than build-host execution capability. Runtime dispatch (fbgemmHasAvx512Support / isZmm) already gates execution on the target CPU, so the runs-based probe was over-strict and skipped the AVX-512 sources on builders without AVX-512+BF16 hardware, leaving fbgemm_gpu's fbgemm.so with an unresolved FloatToFloat16_avx512 at load time.
f8664a3 to
41a247e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the beginning of a series of works to create formal float16 and bfloat16 types, which can be used to simplify the templates by reducing the parameter number and using compile-time computing.