Skip to content

[tests] fix torchao tests#13330

Open
sayakpaul wants to merge 2 commits intomainfrom
fix-torchao-tests
Open

[tests] fix torchao tests#13330
sayakpaul wants to merge 2 commits intomainfrom
fix-torchao-tests

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

Surfaced in #13291 (comment). Cc: @howardzhang-cv

@sayakpaul sayakpaul requested a review from DN6 March 25, 2026 04:09
model_quantized.to(torch_device)

inputs = self.get_dummy_inputs()
model_dtype = next(model_quantized.parameters()).dtype
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would affect all quantization backends? e.g. With a GGUF backend the dtype could end up as int8 and potentially cast inputs into int8?

Also prefer to avoid casting inputs post fetching from self.get_dummy_inputs() within a test if we can avoid it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Where should it go then? Should we implement a custom get_dummy_inputs() for torchao tests? I think it's reasonably safe to keep the dtypes of the inputs to bfloat16 there because that will replicate what we do in actual pipelines. LMK.

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.

2 participants