You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the two tensors are the same, what is the expected result? It is 1.0 or a number close to 1.0? This will lead to different result when apply trunc, lead to the UT failures.
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref__refs_div_trunc_rounding_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref_executor__refs_div_trunc_rounding_executor_aten_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref_torch_fallback__refs_div_trunc_rounding_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
🐛 Describe the bug
When the two tensors are the same, what is the expected result? It is 1.0 or a number close to 1.0? This will lead to different result when apply trunc, lead to the UT failures.
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref__refs_div_trunc_rounding_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref_executor__refs_div_trunc_rounding_executor_aten_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
FAILED test_ops_xpu.py::TestCommonXPU::test_python_ref_torch_fallback__refs_div_trunc_rounding_xpu_float64 - Exception: Caused by reference input at index 16: SampleInput
(Pdb) f1=torch.tensor(-501., device='xpu:0', dtype=torch.float64)
(Pdb) e1=f1
(Pdb) torch.div(f1, e1, rounding_mode='trunc')
tensor(1., device='xpu:0', dtype=torch.float64)
(Pdb) torch.div(f1, e1)
tensor(0.9999999999999998889776975374843459576368331909179687500000000000,
device='xpu:0', dtype=torch.float64)
(Pdb) torch.trunc(torch.div(f1, e1))
tensor(0., device='xpu:0', dtype=torch.float64)
Versions
torch-xpu-ops 1209 nightly build.
The text was updated successfully, but these errors were encountered: