Commit 8beabff
[PyTorchEdge] Make aten function common to aten and torch_common (#66663)
Summary:
Pull Request resolved: #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: d35f069f975db6dce0b678c5b5ddd74bd690f5991 parent f8f04d5 commit 8beabff
File tree
3 files changed
+27
-18
lines changed- aten/src/ATen/native
- tools
3 files changed
+27
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 231 | | |
250 | 232 | | |
251 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
941 | 942 | | |
942 | 943 | | |
943 | 944 | | |
| |||
0 commit comments