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

mapreduce: change iteration for compatibility with non-commutative operators. #500

Merged
merged 2 commits into from
Oct 28, 2020

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Oct 20, 2020

Fixes #484

@tkf: do you have an example of an invocation with a scalar element type (to see if the shuffle version also works)?

@maleadt maleadt added the cuda array Stuff about CuArray. label Oct 20, 2020
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #500 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #500   +/-   ##
=======================================
  Coverage   80.54%   80.55%           
=======================================
  Files         166      166           
  Lines        8879     8880    +1     
=======================================
+ Hits         7152     7153    +1     
  Misses       1727     1727           
Impacted Files Coverage Δ
src/mapreduce.jl 97.82% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7616664...a2aaabb. Read the comment docs.

@tkf
Copy link
Contributor

tkf commented Oct 21, 2020

Thanks for fixing this!

with a scalar element type

How about this?: reinterpret(UInt32, maximum(CuArray(reinterpret.(Float32, reinterpret(UInt32, NaN32) .+ (UInt32(5):UInt32(100000)))))) == reinterpret(UInt32, NaN32) + 5

It's true if I remove CuArray.

The idea is to use different bit patterns of NaN to distinguish NaNs at different positions.

@maleadt
Copy link
Member Author

maleadt commented Oct 23, 2020

That doesn't seem to work:

julia> max(reinterpret(UInt32, NaN32) + 5, reinterpret(UInt32, NaN32) + 6) == reinterpret(UInt32, NaN32) + 5
false

julia> reinterpret(UInt32, maximum(Array(reinterpret.(Float32, reinterpret(UInt32, NaN32) .+ (UInt32(5):UInt32(6)))))) == reinterpret(UInt32, NaN32) + 5
false

@maleadt maleadt merged commit bc0184e into master Oct 28, 2020
@maleadt maleadt deleted the tb/mapreduce_commutative branch October 28, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda array Stuff about CuArray.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mapreduce assumes commutative op
2 participants