pytorch
2f0b0c5d - exponential_ few fixes (1) lambda > 0 (2) mkl kernel to continuous (3) better error log on dtype (#92891)

Commit
1 year ago
exponential_ few fixes (1) lambda > 0 (2) mkl kernel to continuous (3) better error log on dtype (#92891) Exponential distribution is continuous. Fixes CPU MKL exponential implementation to exclude integer dtypes. ```python import torch dtypes = [torch.uint8, torch.int8, torch.int16, torch.int32, torch.int64] for dtype in dtypes: x = torch.empty(10000, dtype=dtype).exponential_() # should fail ! print("dtype: ", x.dtype, "sum: ", x.sum()) ``` ### Additional Context Related to #92709. This issue propagates to OpInfo of exponential. ``` AssertionError: The supported dtypes for exponential on device type cpu are incorrect! The following dtypes worked in forward but are not listed by the OpInfo: {torch.int64, torch.uint8, torch.int8, torch.int16, torch.int32}. ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/92891 Approved by: https://github.com/CaoE, https://github.com/jgong5, https://github.com/ngimel
Author
Committer
Parents
Loading