Background: IPEX added boundary check assertion in gpu kernel https://github.com/intel-innersource/frameworks.ai.pytorch.ipex-gpu/pull/4555 and a UT(ipex/tests/gpu/example/test_embedding_bag.py::TestTorchMethod::test_embeddingbag_out_of_bounds) to test the debug log being printed when input is out of boundary.
Ops in torch-xpu-ops do not have this check and hence fail in this UT.
I check that CUDA does not have this boundary check, this feature is IPEX only. In IPEX2.5, we override this Ops with IPEX implementation to make this UT pass.
Please decide whether we need to add this boundary check in torch-xpu-ops.
🐛 Describe the bug
Background: IPEX added boundary check assertion in gpu kernel https://github.com/intel-innersource/frameworks.ai.pytorch.ipex-gpu/pull/4555 and a UT(ipex/tests/gpu/example/test_embedding_bag.py::TestTorchMethod::test_embeddingbag_out_of_bounds) to test the debug log being printed when input is out of boundary.
Ops in torch-xpu-ops do not have this check and hence fail in this UT.
I check that CUDA does not have this boundary check, this feature is IPEX only. In IPEX2.5, we override this Ops with IPEX implementation to make this UT pass.
Please decide whether we need to add this boundary check in torch-xpu-ops.
Versions
ipex/tests/gpu/example/test_embedding_bag.py::TestTorchMethod::test_embeddingbag_out_of_bounds
Assertion
vec_idx < num_row
failed