-
Notifications
You must be signed in to change notification settings - Fork 248
[AOTI] Add a --dynamic-shapes option to export #1011
Conversation
Summary: The inputs to model forward are with static shapes, so changing the export call to make sure more Inductor optimizations will take effect down the stream. This change by itself improves average tokens/sec from 29.60 to 33.43 on A100. Some following PRs will provide further perf gains.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1011
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit 334654e with merge base 912917f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Great to see the perf gains, is anything lost by switching over to static? Does model support change? |
ET export is doing the same so it should be fine, torchchat/export_util/export_et.py Lines 57 to 65 in 912917f
|
|
Amazing, thanks for fixing this One last ask: Can you put the repro commands for the #'s in your description? |
Done. We should add a benchmarking script so that everyone can run the same experiment. |
Summary: The --dynamic-shapes option will default to False. When the actual inputs are with static shapes, calling export with static shapes will make sure more Inductor optimizations take effect down the line. This change by itself improves average tokens/sec from 29.60 to 33.43 on A100. Some following PRs will provide further perf gains.