-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[jit] Fix jit not round to even if const is folded #40897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@suo @gmagogsfm @fmassa would you mind looking at it? |
💊 CI failures summary and remediationsAs of commit 0d2ff45 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 14 times. |
ede07f9 to
97ded94
Compare
and only use the trick to handle halfway values
d1ebc1d to
5f63eee
Compare
| // special halfway case. For positive 'x', round(x/2)*2 = | ||
| // round((x_e + x_r)/2)*2 = x_e + round(x_r/2)*2, where x_e is an even integer, | ||
| // x_r is either 0.5 of 1.5, round(x_r/2)*2 results a 0 or 2, so the final | ||
| // result will always be a even number. Due to symmetric, it also applies to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/symmetric/symmetricity
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmagogsfm has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Thank you cloudhan for contributing this fix! |
|
@gmagogsfm merged this pull request in e44f460. |
This has been fixed in PyTorch in pytorch/pytorch#40897
This has been fixed in PyTorch in pytorch/pytorch#40897
This has been fixed in PyTorch in pytorch/pytorch#40897
Fixed #40771