Add Vectorized<c10::BFloat16> specialization for ARM#139090
Closed
swolchok wants to merge 17 commits intogh/swolchok/681/basefrom
Closed
Add Vectorized<c10::BFloat16> specialization for ARM#139090swolchok wants to merge 17 commits intogh/swolchok/681/basefrom
swolchok wants to merge 17 commits intogh/swolchok/681/basefrom
Conversation
When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both `defined(__ARM_FEATURE_BF16)` and `!defined(__ARM_FEATURE_BF16)` builds, feedback especially welcome there. Differential Revision: [D64997747](https://our.internmc.facebook.com/intern/diff/D64997747/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139090
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 47201a1 with merge base 419a7e1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D64997747 |
This was referenced Oct 28, 2024
Closed
… ARM" When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both `defined(__ARM_FEATURE_BF16)` and `!defined(__ARM_FEATURE_BF16)` builds, feedback especially welcome there. Differential Revision: [D64997747](https://our.internmc.facebook.com/intern/diff/D64997747/) [ghstack-poisoned]
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D64997747 |
… ARM" When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both `defined(__ARM_FEATURE_BF16)` and `!defined(__ARM_FEATURE_BF16)` builds, feedback especially welcome there. Differential Revision: [D64997747](https://our.internmc.facebook.com/intern/diff/D64997747/) [ghstack-poisoned]
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D64997747 |
… ARM" When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both `defined(__ARM_FEATURE_BF16)` and `!defined(__ARM_FEATURE_BF16)` builds, feedback especially welcome there. Differential Revision: [D64997747](https://our.internmc.facebook.com/intern/diff/D64997747/) [ghstack-poisoned]
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D64997747 |
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both `defined(__ARM_FEATURE_BF16)` and `!defined(__ARM_FEATURE_BF16)` builds, feedback especially welcome there. Testing: vec_test_all_types should cover correctness. For perf, seems clear that using vectorized intrinsics should be better than vec_base? Differential Revision: [D64997747](https://our.internmc.facebook.com/intern/diff/D64997747/) Pull Request resolved: pytorch#139090 Approved by: https://github.com/jgong5, https://github.com/malfet ghstack dependencies: pytorch#139084
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
…torch#139558) Discovered this bug when working on Vectorized<BFloat16>; apparently we have no automated testing for aarch64 without FP16. Testing: Manually disable FP16 feature for local vec_test_all_types run on Mac; see pass. Differential Revision: [D65385267](https://our.internmc.facebook.com/intern/diff/D65385267/) Pull Request resolved: pytorch#139558 Approved by: https://github.com/malfet ghstack dependencies: pytorch#139084, pytorch#139090
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
…rch#139081) Following the previous move of fp16_gemv_trans. Testing: Checked for performance regression with llm_benchmarks' `python benchmarks/benchmark_torch_mm.py llm`, didn't find one Differential Revision: [D64930872](https://our.internmc.facebook.com/intern/diff/D64930872/) Pull Request resolved: pytorch#139081 Approved by: https://github.com/malfet ghstack dependencies: pytorch#139084, pytorch#139090, pytorch#139558
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
pytorch#139208) Very similar to pytorch#137917, but for bf16. Differential Revision: [D65155971](https://our.internmc.facebook.com/intern/diff/D65155971/) Pull Request resolved: pytorch#139208 Approved by: https://github.com/malfet ghstack dependencies: pytorch#139084, pytorch#139090, pytorch#139558, pytorch#139081
pobin6
pushed a commit
to pobin6/pytorch
that referenced
this pull request
Dec 5, 2024
This is the big milestone for bf16 and should enable us to close pytorch/torchchat#1253 . Testing: ran python torchchat.py generate llama3.2-1b --dtype bf16 --device cpu on x86 machine with AVX512-bf16. observed similar tokens/sec with and without MKL path hand-disabled. Also observed speedup from ~2.1 tok/sec to 7.4 tok/sec on x86 machine with only AVX2. Differential Revision: [D65170967](https://our.internmc.facebook.com/intern/diff/D65170967/) Pull Request resolved: pytorch#139220 Approved by: https://github.com/malfet ghstack dependencies: pytorch#139084, pytorch#139090, pytorch#139558, pytorch#139081, pytorch#139208
pytorchmergebot
pushed a commit
that referenced
this pull request
Dec 9, 2024
Fix typo causing compilation error on aarch64 architecture with BF16 support. (#139090) tag: @swolchok Pull Request resolved: #142370 Approved by: https://github.com/Skylion007, https://github.com/malfet
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.
Stack from ghstack (oldest at bottom):
When we have hardware support, we can use it. When we don't have hardware support, we can still do better than vec_base.h. I'm not sure to what extent we're set up to properly test both
defined(__ARM_FEATURE_BF16)and!defined(__ARM_FEATURE_BF16)builds, feedback especially welcome there.Testing: vec_test_all_types should cover correctness. For perf, seems clear that using vectorized intrinsics should be better than vec_base?
Differential Revision: D64997747
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10