Skip to content

Embedding_bag_out does not have boundary check and causes IPEX UT fail #1052

Closed
@LuFinch

Description

@LuFinch

🐛 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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions