This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add decimals argument to round (#66195)
Summary: Fixes pytorch/pytorch#65908 Added a new overload instead of updating the current signature. (Had issues with JIT and **maybe** it would have been FC breaking) TODO: * [x] Don't compute `std::pow(10, decimals)` for each element. * [x] Update docs (https://docs-preview.pytorch.org/66195/generated/torch.round.html?highlight=round#torch.round) * [x] Add tests * ~~Should we try to make it composite?~~ * ~~Should we add specialized test with more values of `decimals` outside of OpInfo with larger range of values in input tensor?~~ cc mruberry rgommers Pull Request resolved: pytorch/pytorch#66195 Reviewed By: anjali411 Differential Revision: D31821385 Pulled By: mruberry fbshipit-source-id: 9a03fcb809440f0c83530108284e69c345e1850f
- Loading branch information