pytorch
8beabffa - [PyTorchEdge] Make aten function common to aten and torch_common (#66663)

Commit
3 years ago
[PyTorchEdge] Make aten function common to aten and torch_common (#66663) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66663 fb: TensorCompare.cpp is in per-app, a target higher than torch_mobile Please read this doc to know about [Per-app ATen/native and Template Selective Build]( https://docs.google.com/document/d/1O5--mOAi_gGh2GkE-REo3qJRRQ_Lks69IfgszcB8ThI/edit) Create a filed called "prim_native_functions.cpp" in ATen, add it to aten_cpu, and cut-paste native::is_nonzero() to prim_native_functions.cpp. By doing this we move the function to lower layer which is more visible to all targets depending on it. Instruction count comparison new vs old https://www.internalfb.com/phabricator/paste/view/P463272302?view=diff Test Plan: fb: ``` (base) [pavithran@devvm1803.vll0 /data/users/pavithran/fbsource] buck build //xplat/caffe2:aten_cpu Building: finished in 0.4 sec (100%) 1/202 jobs, 0/202 updated Total time: 0.4 sec More details at https://www.internalfb.com/intern/buck/build/ea35300b-55be-4b9f-bc74-80cdd869c16a BUILD SUCCEEDED (base) [pavithran@devvm1803.vll0 /data/users/pavithran/fbsource] buck build //xplat/caffe2:aten_native_cpu Building: finished in 0.7 sec (100%) 1/1 jobs, 0/1 updated Total time: 0.8 sec More details at https://www.internalfb.com/intern/buck/build/ccd97d43-c59d-4f29-9418-485cd24575e2 BUILD SUCCEEDED ``` Reviewed By: iseeyuan Differential Revision: D31669536 fbshipit-source-id: d35f069f975db6dce0b678c5b5ddd74bd690f599
Author
Parents
Loading