Skip to content
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

Use unordered NEQ comparison for vec512 operator!= implementations #97466

Closed
wants to merge 1 commit into from

Conversation

bjhargrave
Copy link
Contributor

@bjhargrave bjhargrave commented Mar 23, 2023

This is consistent with the vec256 operator!= implementations. _CMP_NEQ_UQ is the logical opposite of _CMP_EQ_OQ comparison used in the operator== implementations.

Using the ordered NEQ operation results in nan != nan being false which is incorrect.

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10

This is consistent with the vec256 operator!= implementations.
_CMP_NEQ_UQ is the logical opposite of _CMP_EQ_OQ comparison used in
the operator== implementations.

Using the ordered NEQ operation results in nan != nan being false which
is incorrect.

Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 23, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/97466

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 7bb4c06:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions github-actions bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Mar 23, 2023
Copy link
Collaborator

@jgong5 jgong5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Better we can cover vec512 cases in CI. @sanchitintel

Copy link
Collaborator

@sanchitintel sanchitintel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching & fixing this bug! :)

@sanchitintel
Copy link
Collaborator

LGTM. Better we can cover vec512 cases in CI. @sanchitintel

@jgong5, PyTorch CI had AVX512 ATen kernels enabled for a couple of months last year but this bug wasn't caught with the erstwhile CI jobs' workloads. We should probably add a UT to check nan != nan for both AVX2 & AVX512. I can do so in a subsequent PR next week, if you'd like. Thanks!

@bjhargrave
Copy link
Contributor Author

@pytorchbot label "topic: bug fixes" "release notes: intel"

@pytorch-bot pytorch-bot bot added release notes: intel release notes category topic: bug fixes topic category labels Mar 24, 2023
@bjhargrave
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 24, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 1, 3, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

@jgong5
Copy link
Collaborator

jgong5 commented Mar 25, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) open source release notes: intel release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants