We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As titled, this is a regression. IPEX could give a correct result for bf16 on XPU.
import torch torch.manual_seed(0) a = torch.randn(5, dtype=torch.bfloat16) b = torch.randn(5, dtype=torch.bfloat16) print(f"a: {a}") print(f"b: {b}") print(torch.nextafter(a, b)) x_a = a.to('xpu') x_b = b.to('xpu') print(torch.nextafter(x_a, x_b))
Output:
a: tensor([ 1.5391, -0.2930, -2.1719, 0.5703, -1.0859], dtype=torch.bfloat16) b: tensor([-1.3984, 0.4043, 0.8398, -0.7188, -0.4043], dtype=torch.bfloat16) tensor([ 1.5312, -0.2910, -2.1562, 0.5664, -1.0781], dtype=torch.bfloat16) tensor([ 1.5391, -0.2930, -2.1719, 0.5703, -1.0859], device='xpu:0', dtype=torch.bfloat16)
None
cc @fengyuan14 @xytintel
The text was updated successfully, but these errors were encountered:
nextafter
Improve bfloat16 accuracy of nextafter kernel (#1298)
4c6dedd
Resolve #1169
Improve bfloat16 accuracy of nextafter kernel (step2) (#1302)
244950b
xytintel
Successfully merging a pull request may close this issue.
As titled, this is a regression. IPEX could give a correct result for bf16 on XPU.
Output:
Versions
None
cc @fengyuan14 @xytintel
The text was updated successfully, but these errors were encountered: