Add test to ensure executorch exportability with dynamic shapes#43424
Add test to ensure executorch exportability with dynamic shapes#43424justinchuby wants to merge 1 commit intohuggingface:mainfrom
Conversation
| ) | ||
| torch.testing.assert_close(eager_output_embeds, exported_output_embeds, atol=1e-4, rtol=1e-4) | ||
|
|
||
| def test_decoder_only_lm_export_with_dynamic_shapes(self): |
There was a problem hiding this comment.
I re-added the slice ops and it still passed (torch 2.9.0) so we should make it a bit more constrained
I assume this is due to a simple forward not really changing shapes, hence the slicing doesn't matter? Or given that there is not attention mask, it isn't really triggered?
There was a problem hiding this comment.
I see. Yes an attention mask is probably needed
|
@vasqu even though this test does not include masks, it is still useful to guard general exportability with dynamic shapes. Would it be possible to merge this change first? I can create a follow up with more test variations. |
|
@justinchuby Not opposed to it in general but I don't really see the merit in having a test that doesn't cover its original purpose? Would it be possible to extend these tests here instead? |
What does this PR do?
Previously the models were not exportable with dynamic shapes due to slices removed in #41900.
This PR adds a test to ensure executorch exportability with dynamic shapes.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@vasqu @ArthurZucker @Cyrilvallez