forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type promotion for
ldexp
(pytorch#133519)
According to the documentation, ldexp of half and int should return half tensor and ldexp of double should not overflow for 64-bit exponent Introduce `_pow2` helper function that does not follow scalar to float32 promotion pattern if `self` is reduced precision float or double Add regression tests to `test_ldexp` and enable it to run on both CPU and GPU Fixes pytorch#133267 Pull Request resolved: pytorch#133519 Approved by: https://github.com/janeyx99, https://github.com/Skylion007
- Loading branch information
1 parent
3a904d1
commit 1653f77
Showing
2 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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