Unbreak vec128_half_neon comparison without FP16 hardware support#139558
Unbreak vec128_half_neon comparison without FP16 hardware support#139558swolchok wants to merge 7 commits intogh/swolchok/688/basefrom
Conversation
…re suppo 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/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139558
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit bcb32c3 with merge base 419a7e1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
this is only a problem if FCVTN canonicalizes NaNs. It's implementation-defined whether it will do that by default; the behavior is controlled by the DN bit of the FPCR, which is unknown after a reset. (https://developer.arm.com/documentation/ddi0595/2021-03/AArch64-Registers/FPCR--Floating-point-Control-Register?lang=en#fieldset_0-25_25) Therefore I cannot repro a bug locally with the existing behavior, but I can check to make sure things still work with this diff. |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
…support" 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/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D65385267 |
| return Vectorized<c10::Half>(vcombine_f16(r00, r01)); | ||
| } | ||
|
|
||
| Vectorized<c10::Half> map2_bitmask_with_vec_float_method( |
) 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: #139081 Approved by: https://github.com/malfet ghstack dependencies: #139084, #139090, #139558
#139208) Very similar to #137917, but for bf16. Differential Revision: [D65155971](https://our.internmc.facebook.com/intern/diff/D65155971/) Pull Request resolved: #139208 Approved by: https://github.com/malfet ghstack dependencies: #139084, #139090, #139558, #139081
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: #139220 Approved by: https://github.com/malfet ghstack dependencies: #139084, #139090, #139558, #139081, #139208
…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
…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
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
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
Stack from ghstack (oldest at bottom):
Discovered this bug when working on Vectorized; 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
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10