Skip to content

Conversation

@sayakpaul
Copy link
Contributor

@sayakpaul sayakpaul commented Sep 5, 2025

I don't see an issue for this tutorial. I discussed this with @angelayi and we agreed that having a recipe like is beneficial to the AoT workflow.

I ran the Python script introduced in this PR on a single RTX 4090, and I got:

Full model compilation time = 5.91 seconds
Regional compilation time = 2.54 seconds

cc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 5, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3543

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit e6b1474 with merge base 4696f66 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Sep 5, 2025

**Author:** `Sayak Paul <https://github.com/sayakpaul>`, `Charles Bensimon <https://github.com/cbensimon>`, `Angela Yi <https://github.com/angelay>`

In our [regional compilation recipe](https://docs.pytorch.org/tutorials/recipes/regional_compilation.html), we showed
Copy link
Contributor

@angelayi angelayi Sep 5, 2025

Choose a reason for hiding this comment

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

Maybe we can add to this tutorial saying something like, "if you want to learn how to do it using the AOT technologies, check out this page"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sayakpaul sayakpaul requested a review from angelayi September 5, 2025 06:12
_ = model(input)
return end - start

def aot_compile_load_model(regional=False) -> torch.nn.Module:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to benchmark the compilation time in this case as there's some form of CUDA warming up already present from AoT.

@sayakpaul
Copy link
Contributor Author

@angelayi I have fixed a couple bugs and things are looking as expected on my end. Could you check?

Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

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

Thanks so much for your contribution. Just a few suggestions - let me know if you have any questions.

@sayakpaul
Copy link
Contributor Author

@svekars your comments have been addressed. LMK if there's anything else.

@sayakpaul sayakpaul requested a review from svekars September 5, 2025 16:06
@svekars
Copy link
Contributor

svekars commented Sep 5, 2025

Can you fix lint? You can run locally lintrunner -m main to test your fixes.

@sayakpaul sayakpaul requested a review from svekars September 6, 2025 02:17
Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

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

Two rendering issues but the rest LGTM

@sayakpaul sayakpaul requested a review from svekars September 9, 2025 02:18
@sayakpaul
Copy link
Contributor Author

@svekars anything else pending from a merge?

@angelayi
Copy link
Contributor

angelayi commented Sep 11, 2025

tutorial build error seems to be unrelated

@angelayi angelayi merged commit 985341e into pytorch:main Sep 11, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants