-
Notifications
You must be signed in to change notification settings - Fork 62
Description
🐛 Describe the bug
Some failed cases AssertionError: Tensor-likes are not equal!
'''
test_sparse_xpu.py::TestSparseXPU::test_ctor_is_coalesced_with_gradcheck_xpu_float64
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_bfloat16
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_complex128
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_complex64
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_float16
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_float64
test_sparse_xpu.py::TestSparseXPU::test_to_sparse_xpu_int32
'''
To execute this test, run the following from the base repo dir:
PYTORCH_TEST_WITH_SLOW=1 python ....\test\test_sparse.py TestSparseXPU.test_ctor_is_coalesced_with_gradcheck_xpu_float64
'''
__________________ TestSparseXPU.test_to_sparse_xpu_bfloat16 __________________
[gw0] win32 -- Python 3.10.14 C:\Users\dcai01\miniforge3\envs\xpu-test\python.exe
Traceback (most recent call last):
File "C:\pytorch\third_party\torch-xpu-ops\test\xpu\test_sparse_xpu.py", line 73, in _test_to_sparse
expected, _, _ = self._gen_sparse(
File "C:\pytorch\third_party\torch-xpu-ops\test\xpu../../../../test\test_sparse.py", line 198, in _gen_sparse
x, i, v = self.genSparseTensor(with_size, sparse_dim, nnz, not coalesced, dtype=dtype, device=device)
File "C:\Users\dcai01\miniforge3\envs\xpu-test\lib\site-packages\torch\testing_internal\common_utils.py", line 3746, in genSparseTensor
x = torch.sparse_coo_tensor(i, v, torch.Size(size), dtype=dtype, device=device)
RuntimeError: size is inconsistent with indices: for dim 0, size is 5 but found index 8
'''
Versions
Environment:
PyTorch Commit: 2.10.0.dev20251101+xpu / f291f529fdd7fe9b617ece2fa373ca684a11fd7f
XPU Commit: 8d373ba
OS: Microsoft Windows 11 Pro
CPU: Intel(R) Core(TM) Ultra 7 258V
GPU and Driver: Intel(R) Arc(TM) 140V GPU (16GB) 32.0.101.7026
oneAPI: intel.oneapi.win.deep-learning-essentials.product=2025.0.1+20