draft: Proteus lambda redesign RAJA-side support#2052
Draft
johnbowen42 wants to merge 5 commits into
Draft
Conversation
MrBurmark
reviewed
Jul 2, 2026
|
|
||
| auto Seg = RAJA::RangeSegment(0, N); | ||
|
|
||
| RAJA::kernel<kernel_policy>(RAJA::make_tuple(Seg), [=](int i) { |
MrBurmark
reviewed
Jul 2, 2026
| typename Resource, | ||
| typename... Bodies> | ||
| inline auto register_loop_bodies( | ||
| LoopData<SegmentTuple, ParamTuple, Resource, Bodies...> body) |
MrBurmark
reviewed
Jul 2, 2026
| typename ParamTuple, | ||
| typename Resource, | ||
| typename... Bodies> | ||
| inline auto register_loop_bodies( |
Member
There was a problem hiding this comment.
Do we want this to always return by value or return by reference without jit enabled?
MrBurmark
reviewed
Jul 2, 2026
Comment on lines
+685
to
+688
| using registered_data_t = std::decay_t<decltype(registered_bodies)>; | ||
| using registered_launch_t = | ||
| CudaLaunchHelper<LaunchConfig, stmt_list_t, registered_data_t, Types>; | ||
| auto registered_function = registered_launch_t::get_func(); |
Member
There was a problem hiding this comment.
This is a lot more code than it was.
Contributor
Author
There was a problem hiding this comment.
yeah, I am debating simplifying this but shifitng the decision to JIT the lambda to the user. Basically, if a user wanted to JIT their lambda they could wrap it in RAJA::register_lambda before passing to kernel/launch/forall, and then we could get rid of all this boilerplate
Contributor
Author
There was a problem hiding this comment.
What do you think?
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.
We are redesigning lambda support to be more robust here Olympus-HPC/proteus#467, this PR changes how RAJA uses proteus to support the new, slightly changed interface. This PR also adds new examples of JIT compilation with launch and kernel, and also add tests to guarantee that runtime values are being turned into constants at JIT time