[Reland] Include AT_PARALLEL_OPENMP/AT_PARALLEL_NATIVE/AT_PARALLEL_NATIVE_TBB to ATen/Config.h#39881
[Reland] Include AT_PARALLEL_OPENMP/AT_PARALLEL_NATIVE/AT_PARALLEL_NATIVE_TBB to ATen/Config.h#39881pbelevich wants to merge 2 commits intogh/pbelevich/132/basefrom
Conversation
…TIVE_TBB to ATen/Config.h [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit d06178e (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 9 times. |
…PARALLEL_NATIVE_TBB to ATen/Config.h" Differential Revision: [D22008317](https://our.internmc.facebook.com/intern/diff/D22008317) [ghstack-poisoned]
|
I didn't follow the revert; what broke, and how does this fix it? |
|
@pbelevich merged this pull request in e62d655. |
|
@pbelevich merged this pull request in e62d655. |
|
@ezyang |
|
@ilia-cher may know better, but assuming you were right in #39471 and if you compile PyTorch with TBB you MUST use TBB implementation of Parallel.h, then I would certainly expect that tbb.h should be available in one way or another if you want to use the Parallel.h functionality. Now, IIRC, we don't ever distribute binaries that are linked against tbb, so if I understand correctly, your problems here are just because of the TBB CI job. In a perfect universe, we'd have a proper distribution story for TBB, but this would require you to solve a lot more problems (because we'd need to say where tbb is actually coming from; are we relying on a third-party conda package, or distributing our own copy ourselves? What happens with mkl?) So it doesn't seem like the right call is to try to fix the distribution problem for TBB, unless you want to solve this problem for its own sake. But it also seems likely that you will run into problems with removing Parallel.h from the dependency chain of torch/extension.h, as this would technically be a BC-breaking change, making functionality that was previously implicitly available no longer available. And it's not unreasonable to think that third party C++ extensions will be using the functionality of Parallel.h, since it provides functionality that would be generally useful if you were writing a kernel. So, if I were in this situation, I'd probably look for some surgical fix for the relevant CI configuration, rather than a general fix. But that is just an opinion. |
|
"if you compile PyTorch with TBB you MUST use TBB implementation of Parallel.h, then I would certainly expect that tbb.h should be available in one way or another if you want to use the Parallel.h functionality." That's correct, if you set TBB option then we have to use TBB version of Parallel.h and we do use TBB submodule, is this different now? Are we still running TBB build in CI (master)? @pbelevich @ezyang |
yes, here is the example of tbb/tbb.h: No such file or directory when I tried to land #39881 @ezyang this is my "surgical fix" |
…L_NATIVE/AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 and #39881 Differential Revision: [D22050656](https://our.internmc.facebook.com/intern/diff/D22050656) [ghstack-poisoned]
…L_NATIVE/AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 and #39881 Differential Revision: [D22050656](https://our.internmc.facebook.com/intern/diff/D22050656) [ghstack-poisoned]
Essentially, what I am saying is that the commits that added TBB to PyTorch were incomplete: a complete set of diffs also needs to arrange for the correct TBB headers to be made available to C++ extensions. Since we don't seem to actually distribute official TBB binaries for anyone, it seems reasonable enough to skip doing this today, but if you ever want to actually have people use TBB for real, this is one of the things that still needs to get fixed. |
…AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 #39881 and #40045 Differential Revision: [D22076711](https://our.internmc.facebook.com/intern/diff/D22076711) [ghstack-poisoned]
…AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 #39881 and #40045 Differential Revision: [D22076711](https://our.internmc.facebook.com/intern/diff/D22076711) [ghstack-poisoned]
…AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 #39881 and #40045 Differential Revision: [D22076711](https://our.internmc.facebook.com/intern/diff/D22076711) [ghstack-poisoned]
…AT_PARALLEL_NATIVE_TBB to ATen/Config.h" Fixes #39471 Reland of #39612 #39881 and #40045 Differential Revision: [D22076711](https://our.internmc.facebook.com/intern/diff/D22076711) [ghstack-poisoned]
|
@ezyang sure we can add headers, though regarding your last point, I'd want to note that people (companies) actually do use TBB builds of pytorch (I can provide more detail) |
|
Yeah, in this case I'm specifically talking about our OSS distributions, e.g., the wheels and conda packages. |
…_NATIVE_TBB to ATen/Config.h (#40211) Summary: Fixes #39471 Reland of #39612 #39881 #40045 #40122 Proof: [green TBB test](https://app.circleci.com/pipelines/github/pytorch/pytorch/182769/workflows/ae9f4f7a-791a-49df-9625-e2f0a51e70e7/jobs/5910591/steps) Pull Request resolved: #40211 Reviewed By: malfet Differential Revision: D22128537 Pulled By: pbelevich fbshipit-source-id: 98c589405daafc2c81f76e1d5c1aef5e57065351
…TIVE_TBB to ATen/Config.h (pytorch#39881) Summary: Pull Request resolved: pytorch#39881 Test Plan: Imported from OSS Differential Revision: D22008317 Pulled By: pbelevich fbshipit-source-id: b25714d8643cf584bb3331d70e44f4df06c1b615
…_PARALLEL_NATIVE_TBB to ATen/Config.h (pytorch#40045) Summary: Pull Request resolved: pytorch#40045 Fixes pytorch#39471 Reland of pytorch#39612 and pytorch#39881 Test Plan: Imported from OSS Differential Revision: D22050656 Pulled By: pbelevich fbshipit-source-id: 274bc0733c37ef6c87deb3344bb49ca9107e257b
…ARALLEL_NATIVE_TBB to ATen/Config.h (pytorch#40211) Summary: Fixes pytorch#39471 Reland of pytorch#39612 pytorch#39881 pytorch#40045 pytorch#40122 Proof: [green TBB test](https://app.circleci.com/pipelines/github/pytorch/pytorch/182769/workflows/ae9f4f7a-791a-49df-9625-e2f0a51e70e7/jobs/5910591/steps) Pull Request resolved: pytorch#40211 Reviewed By: malfet Differential Revision: D22128537 Pulled By: pbelevich fbshipit-source-id: 98c589405daafc2c81f76e1d5c1aef5e57065351
Fixes #39471
Reland of #39612
@zou3519 :
Should be fixed by #39863
Stack from ghstack:
Differential Revision: D22008317