pytorch
e1ecf53d - Simplify linspace decomp and increase its tolerance (#87203)

Commit
3 years ago
Simplify linspace decomp and increase its tolerance (#87203) This is an interesting one Since this is an operation that's intrinsically defined on the reals, we should perform the ops on that dtype always, and just cast to the desired dtype at the end. This simplifies the decomposition. Now, I started looking at this one when I started seeing failures on a test that's added in a later PR. What's going on here is that, by doing an upcast to a higher dtype and then cast down to integers, sometimes there's an off-by-one error. I think this is fine, as the decomposition is more accurate than the original function, which goes in line with the whole PrimTorch effort. Pull Request resolved: https://github.com/pytorch/pytorch/pull/87203 Approved by: https://github.com/mruberry
Author
Committer
Parents
Loading