LLNL / RAJA

RAJA Performance Portability Layer (C++)
BSD 3-Clause "New" or "Revised" License
474 stars 102 forks source link

Add MultiReducer #1665

Closed MrBurmark closed 2 months ago

MrBurmark commented 3 months ago

Add runtime sized reducer

Add a runtime sized reducer based on design mentioned in #1648.

artv3 commented 3 months ago

Adding an example could be really nice too! You can probably just take one from the unit test.

MrBurmark commented 3 months ago

Here is the nvcc error output.

.../RAJA/test/functional/forall/multi-reduce-basic/tests/test-forall-basic-MultiReduce.hpp:94:394: error: '__T6' was not declared in this scope
     RAJA::forall<EXEC_POLICY>(seg, [=] RAJA_HOST_DEVICE(IDX_TYPE idx) {
                                                                                                                                                                                                                                                                                                                                                                                                          ^
MrBurmark commented 3 months ago

Here is the nvcc error output.

.../RAJA/test/functional/forall/multi-reduce-basic/tests/test-forall-basic-MultiReduce.hpp:94:394: error: '__T6' was not declared in this scope
     RAJA::forall<EXEC_POLICY>(seg, [=] RAJA_HOST_DEVICE(IDX_TYPE idx) {
                                                                                                                                                                                                                                                                                                                                                                                                          ^

I worked around this by putting the enable_if in the return value.

MrBurmark commented 3 months ago

The docs are build here https://raja.readthedocs.io/en/feature-burmark1-multireduce/. @LLNL/raja-core

MrBurmark commented 2 months ago

It looks like the tests on ruby are failing because std::tuple_size is not defined for camp::tuple, but I fixed that in camp and updated the camp submodule in my branch. Could the CI still be using an older version of camp?

rhornung67 commented 2 months ago

It looks like the tests on ruby are failing because std::tuple_size is not defined for camp::tuple, but I fixed that in camp and updated the camp submodule in my branch. Could the CI still be using an older version of camp?

That's likely. Did your fix appear in the v2024.07.0 camp release? The camp spack package in the radiuss-spack-configs submodule has not been updated -- https://github.com/LLNL/radiuss-spack-configs/blob/037ee671622bd3ec2ff955ced356b59dc96fec58/packages/camp/package.py#L111spack-configs. And there is no new RAJA version to identify in the RAJA spack package yet: https://github.com/LLNL/radiuss-spack-configs/blob/037ee671622bd3ec2ff955ced356b59dc96fec58/packages/raja/package.py#L198

It's kind of a chicken and egg thing. Here's a suggestion....

  1. Make a PR branch in radiuss-spack-configs that adds the new camp version info in the camp and raja packages.
  2. Change the radiuss-spack-configs submodule in your RAJA PR branch to point at that branch.

If that works we can go with those changes to get your PR merged. Then, we can do a RAJA release. After that, we can update the version info in the raja package in the radiuss-spack-configs PR branch and get that merged. We will move to the latest radiuss-spack-configs for the RAJA RC branch.

@adrienbernede or @davidbeckingsale do either of you have a better idea for handling this?

MrBurmark commented 2 months ago

That's likely. Did your fix appear in the v2024.07.0 camp release?

Yes, the changes are in the 2024.07.0 release of camp.

rhornung67 commented 2 months ago

Any idea how the Azure tests are passing?

Did my suggestion make sense?

MrBurmark commented 2 months ago

Any idea how the Azure tests are passing?

Are they just using the submodule instead of spack?

Did my suggestion make sense?

Ya, I'm working on making a branch

rhornung67 commented 2 months ago

Yes, you are correct. Azure tests do not use Spack.

If you have any questions while working through this, please let me know.

MrBurmark commented 2 months ago

If you have any questions while working through this, please let me know.

I made a radius-spack-configs branch and pointed this branch at it, we'll see what happens.

rhornung67 commented 2 months ago

@MrBurmark third time is the charm? 😄

MrBurmark commented 2 months ago

@MrBurmark third time is the charm? 😄

*crosses fingers*