-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Support torchbind in OSS proxy executor #149747
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/149747
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 5 Unrelated FailuresAs of commit 4ee3e67 with merge base 01cb351 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D69500038 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arg name should be moved into the initializer std::move
94bce25 to
fcf70f0
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69500038 |
Summary: Implement torchbind support in OSSProxyExecutor. Exactly the same as the implementation in FbProxyExecutor. D69693697 - fbProxyExecutor D69887230 - fbProxyExecutor but for torchbind method Other changes: - When generating the schema of the CallTrochBind HOP, the arg name of the torchbind object arg should be the same as the torchbind method's torchbind object arg (instead of `obj`). - In `AOTIModelPackageLoader`, we extract everything in `data/constants` to `tmp_dir/data/aot_inductor/<model>/` folder, so the torchbind objs exist in the same folder as the rest of the files (e.g. cpp, so). This is to be consistent of how files are packaged internally Note: Seems like there'll be issues with using`filesystem` header in linux: pytorch#137209 So here I use string manipulation instead of `filesystem::path` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r torchbind_aoti buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r aot_compile buck2 build --flagfile fbsource//arvr/mode/win/dev fbsource//arvr/libraries/audio/AudioSDK/Research/Source/BSI/UnitTests:meridian_bsi_tests buck2 build --flagfile fbsource//arvr/mode/embedded/linux/clang-aarch64-release fbsource//arvr/third-party/signalarity/latest-release/src/shaker/ha:signalarity_realtime_libtorch_pipeline_ ``` Differential Revision: D69500038
fcf70f0 to
1707a22
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69500038 |
zou3519
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_higher_order_ops change LGTM, someone else who knows the AOTI code should take a look at that
1707a22 to
1645ea2
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69500038 |
Summary: Pull Request resolved: pytorch#149747 Implement torchbind support in OSSProxyExecutor. Exactly the same as the implementation in FbProxyExecutor. D69693697 - fbProxyExecutor D69887230 - fbProxyExecutor but for torchbind method Other changes: - When generating the schema of the CallTrochBind HOP, the arg name of the torchbind object arg should be the same as the torchbind method's torchbind object arg (instead of `obj`). - In `AOTIModelPackageLoader`, we extract everything in `data/constants` to `tmp_dir/data/aot_inductor/<model>/` folder, so the torchbind objs exist in the same folder as the rest of the files (e.g. cpp, so). This is to be consistent of how files are packaged internally Note: Seems like there'll be issues with using`filesystem` header in linux: pytorch#137209 So here I use string manipulation instead of `filesystem::path` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r torchbind_aoti buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r aot_compile buck2 build --flagfile fbsource//arvr/mode/win/dev fbsource//arvr/libraries/audio/AudioSDK/Research/Source/BSI/UnitTests:meridian_bsi_tests buck2 build --flagfile fbsource//arvr/mode/embedded/linux/clang-aarch64-release fbsource//arvr/third-party/signalarity/latest-release/src/shaker/ha:signalarity_realtime_libtorch_pipeline_ ``` Differential Revision: D69500038
1645ea2 to
332dc10
Compare
| OSSOpKernel& op_kernel) { | ||
| auto& stack = op_kernel.stack_; | ||
| auto& dynamic_args = op_kernel.dynamic_args_; | ||
| OSSOpKernel* op_kernel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why this refernce to pointer change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind. I see your created child classes later.
| } else { // startsWith(filename_str, const_directory) | ||
| // Extract constants to the same directory as the rest of the files | ||
| // to be consistent with internal implementation | ||
| size_t lastSlash = filename_str.find_last_of("/\\"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use k_separator here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use k_separator here.
changed to use k_separator now
Summary: Implement torchbind support in OSSProxyExecutor. Exactly the same as the implementation in FbProxyExecutor. D69693697 - fbProxyExecutor D69887230 - fbProxyExecutor but for torchbind method D70746626 - Support None output type Other changes: - When generating the schema of the CallTrochBind HOP, the arg name of the torchbind object arg should be the same as the torchbind method's torchbind object arg (instead of `obj`). - In `AOTIModelPackageLoader`, we extract everything in `data/constants` to `tmp_dir/data/aot_inductor/<model>/` folder, so the torchbind objs exist in the same folder as the rest of the files (e.g. cpp, so). This is to be consistent of how files are packaged internally (more details in internal Diff summary). Note on using `filesystem`: Seems like there'll be [issues](pytorch#137209) with using`filesystem` header in linux, so here I use string manipulation instead of `filesystem::path`. Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r torchbind_aoti buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r aot_compile buck2 build --flagfile fbsource//arvr/mode/win/dev fbsource//arvr/libraries/audio/AudioSDK/Research/Source/BSI/UnitTests:meridian_bsi_tests buck2 build --flagfile fbsource//arvr/mode/embedded/linux/clang-aarch64-release fbsource//arvr/third-party/signalarity/latest-release/src/shaker/ha:signalarity_realtime_libtorch_pipeline_ ``` Reviewed By: desertfire Differential Revision: D69500038
332dc10 to
4ee3e67
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69500038 |
|
@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 |
|
@pytorchbot revert -m="Diff reverted internally" -c="ghfirst" This Pull Request has been reverted by a revert inside Meta. To re-land this change, please open another pull request, assign the same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk).) |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit aa70d62. Reverted #149747 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](#149747 (comment)))
|
@yushangdi your PR has been successfully reverted. |
|
@pytorchbot merge -i (Initiating merge automatically since Phabricator Diff has merged, merging with -i because oss signals were bypassed internally) |
Merge startedYour change will be merged while ignoring the following 0 checks: Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: Meta Internal-Only Changes Check Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
|
relanding in #150196 |
Summary: Implement torchbind support in OSSProxyExecutor. Exactly the same as the implementation in FbProxyExecutor. D69693697 - fbProxyExecutor D69887230 - fbProxyExecutor but for torchbind method Other changes: - When generating the schema of the CallTrochBind HOP, the arg name of the torchbind object arg should be the same as the torchbind method's torchbind object arg (instead of `obj`). - In `AOTIModelPackageLoader`, we extract everything in `data/constants` to `tmp_dir/data/aot_inductor/<model>/` folder, so the torchbind objs exist in the same folder as the rest of the files (e.g. cpp, so). This is to be consistent of how files are packaged internally Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r torchbind_aoti buck run fbcode//mode/dev-nosan //caffe2/test/inductor:torchbind -- -r aot_compile ``` Differential Revision: D69500038 Pull Request resolved: pytorch#149747 Approved by: https://github.com/desertfire
This reverts commit aa70d62. Reverted pytorch#149747 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](pytorch#149747 (comment)))
Summary:
Implement torchbind support in OSSProxyExecutor.
Exactly the same as the implementation in FbProxyExecutor.
D69693697 - fbProxyExecutor
D69887230 - fbProxyExecutor but for torchbind method
Other changes:
When generating the schema of the CallTrochBind HOP, the arg name of the torchbind object arg should be the same as the torchbind method's torchbind object arg (instead of
obj).In
AOTIModelPackageLoader, we extract everything indata/constantstotmp_dir/data/aot_inductor/<model>/folder, so the torchbind objs exist in the same folder as the rest of the files (e.g. cpp, so). This is to be consistent of how files are packaged internallyTest Plan:
Differential Revision: D69500038
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov