-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove some unnecessary <iostream> includes from headers #106914
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
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/106914
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0fa23bf with merge base d395088 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mcarilli ptrblck leslie-fang-intel EikanWang voznesenskym penguinwu anijain2305 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mcarilli ptrblck leslie-fang-intel EikanWang voznesenskym penguinwu anijain2305 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mcarilli ptrblck leslie-fang-intel EikanWang voznesenskym penguinwu anijain2305 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mcarilli ptrblck leslie-fang-intel EikanWang voznesenskym penguinwu anijain2305 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
| @@ -1 +1 @@ | |||
| 709c75a04d9b35d83a9509e1534a8aa2046b8912 | |||
| c3c16ccac41cb2db6ba88fb31342f4af62c7e15a | |||
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.
This is so we include pytorch/xla#5434
lezcano
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.
Did you apply these by hand, or is it possible to automatise these?
|
I did this manually with |
|
Talking from memory here, but I think that include-what-you-use does do the iosfwd checks. |
|
It seems that it suggests the right thing... sometimes include-what-you-use/include-what-you-use#683 |
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@peterbell10 your PR has been successfully reverted. |
…6914)" This reverts commit 60936e4. Reverted #106914 on behalf of https://github.com/ZainRizvi due to Sorry, but this is breaking internal builds. Seems like a lot of internal code depends on some of the removed imports ([comment](#106914 (comment)))
|
@peterbell10 I'll help with relanding this. |
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mcarilli ptrblck leslie-fang-intel EikanWang voznesenskym penguinwu anijain2305 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
|
@kit1980 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
2 similar comments
|
@kit1980 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@kit1980 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@kit1980 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Pull Request resolved: #106915 Approved by: https://github.com/lezcano ghstack dependencies: #106914
In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `<ostream>` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. Pull Request resolved: #106914 Approved by: https://github.com/lezcano
Pull Request resolved: #106915 Approved by: https://github.com/lezcano ghstack dependencies: #106914
|
@pytorchbot revert -m 'Causing metal breakage internally, see D48709279' -c ghfirst |
`import torch_xla.core.xla_model as xm` no longer trigger the xla runtime to init, hence explictly create the device here. This is a workaround for pytorch/xla#4174. `is_correct` reference has been deleted, I think it is a deadcode. After this patch, I am able to run ``` python benchmarks/dynamo/torchbench.py --randomize-input --performance --trace-on-xla --training --backend=openxla --only resnet50 ``` Pull Request resolved: #107919 Approved by: https://github.com/shunting314, https://github.com/wconstab
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@peterbell10 your PR has been successfully reverted. |
…6914)" This reverts commit a6c29b7. Reverted #106914 on behalf of https://github.com/izaitsevfb due to Causing metal breakage internally, see D48709279 ([comment](#106914 (comment)))
|
Looks like I missed some issues when re-landing first time... |
|
My branches seem to have been deleted, so I've opened a new stack starting at #108149. Also switched the PR order so hopefully the pch update doesn't need to be reverted again. |
Stack from ghstack (oldest at bottom):
In almost all cases this is only included for writing the output formatter, which
only uses
std::ostreamso including<ostream>is sufficient.The istream header is ~1000 lines so the difference is non-trivial.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @mcarilli @ptrblck @leslie-fang-intel @EikanWang @voznesenskym @penguinwu @anijain2305 @Guobing-Chen @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @aakhundov