Vectorize f16 conversion#4253
Closed
Nicoshev wants to merge 1 commit into
Closed
Conversation
❌ Deploy Preview for pytorch-fbgemm-docs failed.
|
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75926678 |
621eaa9 to
f682345
Compare
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 4, 2025
Summary: X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Differential Revision: D75926678
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75926678 |
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 4, 2025
Summary: Pull Request resolved: pytorch#4253 X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Differential Revision: D75926678
a42bc58 to
d5f0c8b
Compare
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 4, 2025
Summary: X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75926678 |
d5f0c8b to
4e4ad3a
Compare
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 4, 2025
Summary: Pull Request resolved: pytorch#4253 X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
4e4ad3a to
309115a
Compare
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 5, 2025
Summary: X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 5, 2025
Summary: X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
309115a to
e026a54
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75926678 |
Nicoshev
added a commit
to Nicoshev/FBGEMM
that referenced
this pull request
Jun 5, 2025
Summary: Pull Request resolved: pytorch#4253 X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
e026a54 to
78b4c61
Compare
Summary: Pull Request resolved: pytorch#4253 X-link: facebookresearch/FBGEMM#1330 Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation. 'float16 to float' will now be vectorized 'float to float16' gets improved before (higher is better): M elements_per_ns_ref elements_per_ns_simd 1 0.0302 0.0242 10 0.205 0.231 32 0.328 0.579 40 0.354 0.697 129 0.442 1.87 256 0.466 1.92 1024 0.488 2.38 8000 0.494 2.55 after: M elements_per_ns_ref elements_per_ns_simd 1 0.0307 0.0253 10 0.301 0.256 32 0.898 0.793 40 1.12 0.967 129 2.76 2.59 256 4.09 3.7 1024 5.67 5.47 8000 6.3 6.31 Reviewed By: MatzeB Differential Revision: D75926678
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75926678 |
78b4c61 to
da33d89
Compare
Contributor
|
This pull request has been merged in 2479717. |
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.
Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/1330
Use C++ language extension type '__fp16' to let clang vectorize float16 conversion, on aarch64 compilation.
'float16 to float' will now be vectorized
'float to float16' gets improved
before (higher is better):
129 0.442 1.87
256 0.466 1.92
1024 0.488 2.38
8000 0.494 2.55
after:
129 2.76 2.59
256 4.09 3.7
1024 5.67 5.47
8000 6.3 6.31
Differential Revision: D75926678