intel / torch-xpu-ops

Apache License 2.0
28 stars 20 forks source link

[To Evaluate] accuracy issue in fine-grained test #184

Open daisyden opened 5 months ago

daisyden commented 5 months ago

TBD:

🐛 Describe the bug

I extended the fine-grained test to run all the xpu support ops and dtypes with test_compare_cpu() test. Please see branch daisyden/fin_grain. To run it with command:

cd torch-xpu-ops/test/xpu/fin_grain
export PYTORCH_TEST_WITH_SLOW=1
bash run_fin_grain.sh

I got the following failures in the end. image

With analysis, we could have several issues:

image

image

image

image

image

image

Versions

myenv.log

daisyden commented 5 months ago

Full test log log.txt

chuanqi129 commented 3 months ago

@daisyden @huaiyuzh please refresh the status of this triage issue

daisyden commented 3 months ago

test_ops_xpu.py::TestCommonXPU::test_compare_cpu_div_trunc_rounding_xpu_float16 PASSED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_index_put_xpu_bool PASSED other issues are still there

daisyden commented 3 months ago

For 4, cuda got the similar issue on test_compare_cpu_pow_cuda_complex64 image

test_compare_cpu_mul_cuda_complex64 image

test_compare_cpu_log_cuda_complex64 passed.

daisyden commented 3 months ago

2 and 3 also exists on cuda.

daisyden commented 3 months ago

For 1, PYTORCH_TEST_WITH_SLOW=1 pytest -v test_ops_xpu.py -k test_compare_cpu_tanh_xpu_complex64

When input is -inf+nanj, xpu tanh output is not aligned to cuda and xpu.

image

The following is cuda output image

According to Coliru C++ behavior should be: image

and seems sycl compiler also has the same behavior image