intel / torch-xpu-ops

Apache License 2.0
29 stars 21 forks source link

TestMathBitsXPU issues #683

Closed daisyden closed 1 month ago

daisyden commented 3 months ago

🐛 Describe the bug

Versions

latest version

daisyden commented 3 months ago

test_ops.py

RuntimeError: value cannot be converted to type float without overflow

    "test_conj_view_addbmm_xpu_complex64",
    "test_neg_conj_view_addbmm_xpu_complex128",
daisyden commented 2 months ago

no this case any more based on latest pytorch, test_neg_view_nn_functional_rrelu_xpu_float64, on db80b98ec460ca5b2fd84c1dfb6426925f64c8cc

daisyden commented 2 months ago

For test_conj_view_addbmm_xpu_complex64, we got "RuntimeError: value cannot be converted to type float without overflow", it could because the addbmm implementation of mkldnn has explicit cast to float like "alpha.to()", when the alpha and beta are complex, it causes the error. {'beta': (1+2j), 'alpha': (2+3j)}. @ZhiweiYan-96 please help follow up. image