Skip to content

Conversation

@artv3
Copy link
Member

@artv3 artv3 commented Nov 25, 2025

DRAFT-PR. -- This MR adds the option to store threadblock info in the launch ctx avoiding calling blockDim.x,y,z during the loop methods in raja launch

startTimer();
for (RepIndex_type irep = 0; irep < run_reps; irep = irep + 1) {

RAJA::launch<launch_policy>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: move the RAJA code into a function that is templated on policies to avoid duplicated code...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much of the body could be a macro?


const int bdx = blockDim.x; //block size is the same for xyz...
//const int bdy = blockDim.y;
//const int bdz = blockDim.z;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding the different dimensions to match the RAJA variant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching is nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the argument runtime_block_size above though? Should that be removed?

}

template<typename inner_x, typename inner_y, typename inner_z, typename RESOURCE>
void MASSVEC3DPA::runRAJAImpl(RESOURCE &res)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True to the RAJA mantra, "Change the policy not src code!"

@artv3
Copy link
Member Author

artv3 commented Dec 5, 2025

TODO: remove Bt as it is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants