pytorch
7b65acdf - Solves Issue #32750 - torch.prod now works fine with FP16 Input Tensor and FP32 Output Tensor (#32831)

Commit
4 years ago
Solves Issue #32750 - torch.prod now works fine with FP16 Input Tensor and FP32 Output Tensor (#32831) Summary: This PR solves Issue https://github.com/pytorch/pytorch/issues/32750. - Changes function prod_kernel_impl to use `out_t` argument instead of `scalar_t` (which caused the garbage output for FP16 input and FP32 output tensor type). - Adds test case for `torch.prod` (for CUDA): tests both `torch.prod` and `torch.tensor.prod`. Checks all the combinations for dtypes: `torch.float16` and `torch.float32`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/32831 Differential Revision: D19664666 Pulled By: ngimel fbshipit-source-id: c275363355c832899f10325043535949cd12b2f8
Author
Parents
Loading