Commit c242a59
[Executorch][Portable] Dont upcast to double for sigmoid
Pull Request resolved: pytorch#6892
Upcasting to double for compute precision may not be aten compliant.
Reason for internal test change:
Apparently running on broadwell CPU vs test runner with Cooper lake gives
different results for this change.
Without this change:
Both broadwell and Cooper lake will produce "Once upon a time, there was a
little"
With this change:
Broadwell still produces "Once upon a time, there was a little", while
Cooperlake produces "Once upon a time, there was a girl".
So one possibility is that that some XNNPACK kernel for Cooper lake is produces
slightly different numerical result that propagates through.
Still landing this change since upcasting to double for compute, does not seem
necessary.
ghstack-source-id: 253832495
@exported-using-ghexport
Differential Revision: [D65928920](https://our.internmc.facebook.com/intern/diff/D65928920/)
Co-authored-by: Kimish Patel <[email protected]>1 parent 3b475e3 commit c242a59
File tree
2 files changed
+24
-15
lines changed- kernels/portable/cpu
- shim/xplat/executorch/kernels/portable
2 files changed
+24
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1083 | 1086 | | |
1084 | 1087 | | |
1085 | 1088 | | |
| |||
0 commit comments