Commit d2001b0
[rocm-libraries] ROCm/rocm-libraries#3836 (commit aef23cd)
[rocThrust] Update complex power function to resolve rounding
issues (#3836)
## Motivation
Recently, some rounding issues in PyTorch on AMD devices were traced
back to an FMA operation in rocThrusts's pow() function, when type
complex<float> is used.
## Technical Details
This fix (credit to @vpykhtin) adds a specialization for type
complex<float> that is enabled only on AMD GPUs. It performs the
calculation in a different way so that the FMA operation no longer
causes rounding issues.
## Test Plan
Run rocThrust and PyTorch tests. Ensure all tests pass.
## Test Result
rocThrust tests pass locally. Working on running PyTorch tests.
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.1 parent 8455671 commit d2001b0
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
36 | 67 | | |
37 | 68 | | |
38 | 69 | | |
| |||
0 commit comments