[Executorch][Portable] Dont upcast to double for sigmoid #6931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request resolved: #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
Summary
[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.
[PLEASE REMOVE] If this PR closes an issue, please add a
Fixes #<issue-id>
line.[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.
Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.