Set +/-infinity as the identity values for floating-point numbers in device operators min and max - #11357
Merged
Merged
Conversation
bdice
requested changes
Jul 26, 2022
bdice
left a comment
Contributor
There was a problem hiding this comment.
The changes look good but we need to add tests for this.
… if appropriate" This reverts commit 3e83f2b.
ttnghia
marked this pull request as draft
July 26, 2022 21:37
…nd `max` if appropriate"" This reverts commit fc00f45.
ttnghia
marked this pull request as ready for review
July 26, 2022 23:27
bdice
approved these changes
Jul 26, 2022
bdice
left a comment
Contributor
There was a problem hiding this comment.
Question about mixing std::numeric_limits<HostType> and cuda::std::numeric_limits<T>, otherwise LGTM.
bdice
reviewed
Jul 27, 2022
bdice
reviewed
Jul 27, 2022
PointKernel
approved these changes
Jul 27, 2022
hyperbolic2346
approved these changes
Jul 27, 2022
HaoYang670
reviewed
Jul 27, 2022
Contributor
Author
|
@gpucibot merge |
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #11357 +/- ##
===============================================
Coverage ? 86.43%
===============================================
Files ? 143
Lines ? 22777
Branches ? 0
===============================================
Hits ? 19687
Misses ? 3090
Partials ? 0 Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes a bug of device operators
minandmaxin generating theidentityvalue for floating-point numbers. In particular:min::identity()should returncuda::std::numeric_limits<T>::infinity()instead ofcuda::std::numeric_limits<T>::max(), andmax::identity()should return-cuda::std::numeric_limits<T>::infinity()instead ofcuda::std::numeric_limits<T>::lowest().Closes #11352.