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

cuda mapreduce #1129

Merged
merged 1 commit into from Mar 3, 2023
Merged

cuda mapreduce #1129

merged 1 commit into from Mar 3, 2023

Conversation

sriharshakandala
Copy link
Member

@sriharshakandala sriharshakandala commented Feb 24, 2023

Fixes #1118

  • Code follows the style guidelines OR N/A.
  • Unit tests are included OR N/A.
  • Code is exercised in an integration test OR N/A.
  • Documentation has been added/updated OR N/A.

@sriharshakandala sriharshakandala linked an issue Feb 24, 2023 that may be closed by this pull request
@sriharshakandala sriharshakandala force-pushed the sk/cuda_mapreduce_fields branch 12 times, most recently from 5cc68a0 to 44b1aeb Compare February 28, 2023 19:43
@sriharshakandala
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Feb 28, 2023
@simonbyrne
Copy link
Member

For broadcasting, I think we need to define a method like

function Base.mapreduce(
fn::F,
op::Op,
bc::Union{
IJFH{<:Any, Nij, A},
Base.Broadcast.Broadcasted{IJFHStyle{Nij, A}},
},
) where {F, Op, Nij, A}
# mapreduce across DataSlab2D
_, _, _, _, Nh = size(bc)
mapreduce(op, 1:Nh) do h
Base.@_inline_meta
slabview = @inbounds slab(bc, h)
mapreduce(fn, op, slabview)
end
end

where A <: CuArray to call mapreduce_cuda

@sriharshakandala sriharshakandala force-pushed the sk/cuda_mapreduce_fields branch 3 times, most recently from 3f3284c to 1349ea1 Compare March 3, 2023 00:02
@sriharshakandala sriharshakandala marked this pull request as ready for review March 3, 2023 00:05
@simonbyrne
Copy link
Member

bors r+

@bors bors bot merged commit 6d5abea into main Mar 3, 2023
@bors bors bot deleted the sk/cuda_mapreduce_fields branch March 3, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPU reductions over fields
2 participants