-
Notifications
You must be signed in to change notification settings - Fork 6k
[tests] help us test torch.compile()
for impactful models
#11430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would like to contribute by adding tests for HunyuanVideoTransformer3DTests |
I would like to contribute by adding tests for UNet2DConditionModelTests |
Let's go! |
Hi @sayakpaul , |
We're open to suggestions :) |
@sayakpaul
Let me know if they're suitable for this task or if you’d recommend focusing on other models. |
Thanks for being willing. Those two models are great but we want to be a bit mindful about these tests in the sense that we are aiming to initially only target the most impactful models. Sadly, those two haven't had much of an impact. So, I would suggest:
|
@sayakpaul |
I would appreciate it if you could take a look at the PR I submitted. |
Uh oh!
There was an error while loading. Please reload this page.
#11085 added a test for checking if there's any graph break or recompilation issue for
torch.compile
d model.We should add this test to the most impactful models to ensure our code is
torch.compile
friendly and has the potential to benefit from it. So far, we test it forFluxTransformer2DModel
. Below are some models I have in mind where this test should be added:HiDreamImageTransformer2DModel
(currently doesn't have a test class like other models from)src/diffusers/models
HunyuanVideoTransformer3DTests
WanTransformer3DTests
UNet2DConditionModelTests
Steps to contribute
TorchCompileTesterMixin
to the respective model testing file. Like:diffusers/tests/models/transformers/test_models_transformer_flux.py
Line 81 in fb29132
RUN_SLOW=1 RUN_COMPILE=1 pytest tests/<PATH_TO_TEST_FILE> -k "test_torch_compile_recompilation_and_graph_break"
. Make sure the machine has a GPU. Please confirm that this test is passing when opening the PR. In case it doesn't pass let us know.torch.compile()
for impactful models #11430). Tag @sayakpaul and @DN6 for a review. Don't hesitate to ask for guidance/help if needed.@DN6 any model classes I am missing?
The text was updated successfully, but these errors were encountered: