Use TensorMethods.cpp#37639
Conversation
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 7258615 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This 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 479 times. |
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
|
Hm, any concerns with overhead due to moving away from the inline methods? |
|
|
||
| template <typename T> | ||
| T * data_ptr() const; | ||
| TORCH_API T * data_ptr() const; |
There was a problem hiding this comment.
Hmm, that's weird. The API annotation on the class itself should have been sufficient. What's going on here?
There was a problem hiding this comment.
err, will update; I was debugging a windows build error
| c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl> impl_; | ||
| }; | ||
|
|
||
| TORCH_API int64_t get_device(Tensor self); |
There was a problem hiding this comment.
Pretty sure this should be CAFFE2_API
There was a problem hiding this comment.
as I understand TORCH_API is defined as CAFFE2_API in WindowsTorchApiMacro.h
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
Summary: Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Differential Revision: [D21374247](https://our.internmc.facebook.com/intern/diff/D21374247) [ghstack-poisoned]
|
This pull request has been merged in 68e62b9. |
|
This broke mobile code analysis. It will not be too easy to fix, we should talk about this with @ljk53 in composability. |
It didn't break because the CI only runs on landed PR. I made it so because there is another e2e CI also covering most part of mobile code analysis. There is only a small unit test that e2e CI doesn't run, which caused the failure. This is the error message on failed CI job: I think we need change it accordingly: https://github.com/pytorch/pytorch/blob/master/test/mobile/op_deps/simple_ops.h You can repeat the test locally using: |
|
You can force all of master ci to run by pushing to ci-all/blah branch on pytorch/pytorch |
Summary: see #37639 Test Plan: #37639 Differential Revision: [D21833287](https://our.internmc.facebook.com/intern/diff/D21833287) [ghstack-poisoned]
Summary: see #37639 Test Plan: #37639 Differential Revision: [D21833287](https://our.internmc.facebook.com/intern/diff/D21833287) [ghstack-poisoned]
Summary: Pull Request resolved: pytorch/pytorch#37639 Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Imported from OSS checked mobile size, no change, small reduction in size in fbios fbios: Succeeded Change in Download Size for arm64 + 3x assets variation: -18.2 KiB Change in Uncompressed Size for arm64 + 3x assets variation: -8.8 KiB reran benchmark, no stat. significant difference buck run mode/opt caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads:benchmark_torchscript_model -- --model_file caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt --num_runs 3 ╷ @ 68592d0d 41 minutes ago iliacher D21374247 ╭─╯ Use TensorMethods.cpp Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1729113760 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/3867976782 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2782186766 hg prev @ 7f501b42 Thursday at 14:26 bvaughan D21764704 ╷ short-circuit pow for complex 1 and 0 exponents Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2155256332 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1802057074 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/4119590830 Differential Revision: D21374247 fbshipit-source-id: 076964415079cf84fb57f1f7b43d087afed86e1d
Summary: Pull Request resolved: pytorch/pytorch#39385 see pytorch/pytorch#37639 Test Plan: pytorch/pytorch#37639 Imported from OSS Differential Revision: D21833287 fbshipit-source-id: 9928d3f4122903d0de67ad312e349352d5f5c19c
Summary: Pull Request resolved: pytorch/pytorch#37639 Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Imported from OSS checked mobile size, no change, small reduction in size in fbios fbios: Succeeded Change in Download Size for arm64 + 3x assets variation: -18.2 KiB Change in Uncompressed Size for arm64 + 3x assets variation: -8.8 KiB reran benchmark, no stat. significant difference buck run mode/opt caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads:benchmark_torchscript_model -- --model_file caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt --num_runs 3 ╷ @ 68592d0d 41 minutes ago iliacher D21374247 ╭─╯ Use TensorMethods.cpp Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1729113760 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/3867976782 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2782186766 hg prev @ 7f501b42 Thursday at 14:26 bvaughan D21764704 ╷ short-circuit pow for complex 1 and 0 exponents Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2155256332 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1802057074 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/4119590830 Differential Revision: D21374247 fbshipit-source-id: 076964415079cf84fb57f1f7b43d087afed86e1d
Summary: Pull Request resolved: pytorch/pytorch#39385 see pytorch/pytorch#37639 Test Plan: pytorch/pytorch#37639 Imported from OSS Differential Revision: D21833287 fbshipit-source-id: 9928d3f4122903d0de67ad312e349352d5f5c19c
Summary: Pull Request resolved: pytorch#37639 Changing TensorMethods.h to .cpp Necessary to avoid incomplete types in dispatcher Test Plan: CI Imported from OSS checked mobile size, no change, small reduction in size in fbios fbios: Succeeded Change in Download Size for arm64 + 3x assets variation: -18.2 KiB Change in Uncompressed Size for arm64 + 3x assets variation: -8.8 KiB reran benchmark, no stat. significant difference buck run mode/opt caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads:benchmark_torchscript_model -- --model_file caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt --num_runs 3 ╷ @ 68592d0d 41 minutes ago iliacher D21374247 ╭─╯ Use TensorMethods.cpp Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1729113760 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/3867976782 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2782186766 hg prev @ 7f501b42 Thursday at 14:26 bvaughan D21764704 ╷ short-circuit pow for complex 1 and 0 exponents Created 3 benchmark runs on aibench for caffe2/caffe2/fb/high_perf_models/pytorch/benchmark_framework_overheads/addmodule.pt. Links to the results: * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/2155256332 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/1802057074 * Adhoc run: https://our.intern.facebook.com/intern/aibench/details/4119590830 Differential Revision: D21374247 fbshipit-source-id: 076964415079cf84fb57f1f7b43d087afed86e1d
Summary: Pull Request resolved: pytorch#39385 see pytorch#37639 Test Plan: pytorch#37639 Imported from OSS Differential Revision: D21833287 fbshipit-source-id: 9928d3f4122903d0de67ad312e349352d5f5c19c
Stack from ghstack:
Summary:
Changing TensorMethods.h to .cpp
Necessary to avoid incomplete types in dispatcher
Test Plan:
CI
Differential Revision: D21374247