Use TensorMethods.cpp (#37639)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/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