-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[AOTInductor] ProxyExecutor support Dynamic Shape #110526
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110526
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 5c03140 with merge base 901aa85 ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D49887555 |
Summary:
Extend ProxyExecutor to support dynamic shape.
Example of ProxyExecutor invocation with symints.
```
int64_t* arg0_1_size;
AOTI_TORCH_ERROR_CODE_CHECK(aoti_torch_get_sizes(arg0_1, &arg0_1_size));
auto s0 = arg0_1_size[0];
auto s1 = arg0_1_size[1];
int64_t* arg1_1_size;
AOTI_TORCH_ERROR_CODE_CHECK(aoti_torch_get_sizes(arg1_1, &arg1_1_size));
auto s2 = arg1_1_size[0];
auto s3 = arg1_1_size[1];
...
aoti_torch_proxy_executor_call_function(proxy_executor, 0, 15, std::vector<int64_t>{42, 16, 17, s0 + s1, s0 + s1, s2*s3, 45, 67, 16, 17, s2*s3, s2*s3, s0 + s1, 89, 910}.data(), 7, std::vector<AtenTensorHandle>{arg0_1, arg0_1, arg1_1, buf2, arg0_1, arg1_1, buf4}.data());
```
Example of serialized SymInt(s) arguments:
```
{
"name": "symint",
"arg": {
"asSymInt": {
"asName": "s0 + s1"
}
}
},
{
"name": "symints",
"arg": {
"asSymInts": [
{
"asName": "s0 + s1"
},
{
"asName": "s2*s3"
}
]
}
},
...
{
"name": "o_symint",
"arg": {
"asSymInt": {
"asName": "s2*s3"
}
}
},
{
"name": "o_symints",
"arg": {
"asSymInts": [
{
"asName": "s2*s3"
},
{
"asName": "s0 + s1"
}
]
}
},
```
Test Plan: buck2 run mode/dev-nosan deeplearning/aot_inductor/test:test_custom_ops
Reviewed By: chenyang78
Differential Revision: D49887555
11bd5bd to
f7572fb
Compare
|
This pull request was exported from Phabricator. Differential Revision: D49887555 |
f7572fb to
5c03140
Compare
|
This pull request was exported from Phabricator. Differential Revision: D49887555 |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary:
Extend ProxyExecutor to support dynamic shape.
Example of ProxyExecutor invocation with symints.
Example of serialized SymInt(s) arguments:
Test Plan: buck2 run mode/dev-nosan deeplearning/aot_inductor/test:test_custom_ops
Differential Revision: D49887555
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @avikchaudhuri @gmagogsfm