-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix dependency on filesystem on Linux #137209
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/137209
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 Cancelled Jobs, 1 Unrelated FailureAs of commit 01d8bea with merge base 8962610 ( CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| if (getcwd(currentPath, sizeof(currentPath)) != nullptr) { | ||
| return std::string(currentPath); | ||
| } else { | ||
| throw std::runtime_error("Failed to get current path"); |
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.
When this is possible?
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.
When your current working directory is deleted for example
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.
| #if __has_include("filesystem") | ||
| return fs::current_path(); | ||
| std::string get_current_path() { | ||
| #ifdef _WIN32 |
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.
I would change it to #if __has_include("filesystem") && !defined(__LINUX__) as we want to use those on both Windows and Mac, where we don't have this problem
|
|
||
| bool create_directories(const std::string& path) { | ||
| #if __has_include("filesystem") | ||
| #ifdef _WIN32 |
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.
Same as above, don't restrict it to windows and check that CXX11 ABI is present
|
@pytorchmergebot merge |
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 |
Merge failedReason: 2 jobs have failed, first few of them are: windows-binary-wheel / wheel-py3_10-cuda12_1-build, windows-binary-wheel / wheel-py3_12-cuda12_4-build Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge -f "all required jobs are passing" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot cherry-pick -c critical --onto release/2.5 |
Cherry picking #137209Command Details for Dev Infra teamRaised by workflow job |
|
Manually cherry-picking into 2.5 - #137242 |
* Apply changes from #135374 * Fix dependency on filesystem on Linux (#137209) Similar to: #134494 We are seeing come back of #133437 due to use of filesystem on Linux Pull Request resolved: #137209 Approved by: https://github.com/kit1980, https://github.com/malfet --------- Co-authored-by: atalman <[email protected]>
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
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
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
Summary: The original Diff D69500038 is reverted due to a false alarm on trunk health. 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_ ``` Differential Revision: D72063691
Summary: The original Diff D69500038 is reverted due to a false alarm on trunk health. 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](#137209) with using`filesystem` header in linux, so here I use string manipulation instead of `filesystem::path`. Test Plan: ``` test/inductor:torchbind -- -r torchbind_aoti test/inductor:torchbind -- -r aot_compile ``` Differential Revision: D72063691 Pull Request resolved: #150196 Approved by: https://github.com/hl475, https://github.com/desertfire
Summary: The original Diff D69500038 is reverted due to a false alarm on trunk health. 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: ``` test/inductor:torchbind -- -r torchbind_aoti test/inductor:torchbind -- -r aot_compile ``` Differential Revision: D72063691 Pull Request resolved: pytorch#150196 Approved by: https://github.com/hl475, https://github.com/desertfire
Similar to: #134494
We are seeing come back of #133437 due to use of filesystem on Linux