Commit 239e41c
committed
[Executorch][Portable] Dont upcast to double for sigmoid
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.
Differential Revision: [D65928920](https://our.internmc.facebook.com/intern/diff/D65928920/)
[ghstack-poisoned]1 parent dc41596 commit 239e41c
File tree
2 files changed
+30
-15
lines changed- kernels/portable/cpu
- shim/xplat/executorch/kernels/portable
2 files changed
+30
-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 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1077 | 1080 | | |
1078 | 1081 | | |
1079 | 1082 | | |
| |||
0 commit comments