Skip to content

Conversation

@jiqing-feng
Copy link
Contributor

Fix xpu tests in compressed tensors by mapping different expect outputs.

@jiqing-feng jiqing-feng marked this pull request as ready for review December 5, 2025 04:55
@github-actions github-actions bot requested a review from ydshieh December 5, 2025 04:56
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

[For maintainers] Suggested jobs to run (before merge)

run-slow: compressed_tensors_integration

@jiqing-feng
Copy link
Contributor Author

run-slow: compressed_tensors_integration

@jiqing-feng
Copy link
Contributor Author

cc @yao-matrix

@jiqing-feng
Copy link
Contributor Author

Hi @ydshieh . Could you please review this PR? Thanks!

Comment on lines +83 to +85
torch.equal(
submodule.weight.to(torch_device), comp_decomp_obj.weight.to(torch_device)
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have seen that these 2 could be on different device?

Copy link
Contributor Author

@jiqing-feng jiqing-feng Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I run it on A100 and got the device error:

FAILED tests/quantization/compressed_tensors_integration/test_compressed_models.py::StackCompressedModelTest::test_compressed_uncompressed_model_shapes - RuntimeError: Expected all tensors to be on the same device, but got other is on cuda:1, different from other tensors on cuda:0 (wh...

@ydshieh
Copy link
Collaborator

ydshieh commented Dec 5, 2025

cc @SunMarc @MekkCyber

Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Thanks for fixing

Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@SunMarc SunMarc enabled auto-merge (squash) December 5, 2025 14:20
@SunMarc SunMarc merged commit 28906c3 into huggingface:main Dec 5, 2025
14 checks passed
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

sarathc-cerebras pushed a commit to sarathc-cerebras/transformers that referenced this pull request Dec 7, 2025
* fix compressed tensor tests

Signed-off-by: jiqing-feng <[email protected]>

* update

Signed-off-by: jiqing-feng <[email protected]>

* update comment

Signed-off-by: jiqing-feng <[email protected]>

* format

Signed-off-by: jiqing-feng <[email protected]>

---------

Signed-off-by: jiqing-feng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants