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

kernel function information for hip #1123

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

CRobeck
Copy link
Member

@CRobeck CRobeck commented Sep 23, 2021

No description provided.

static hipFuncAttributes get_hip_func_attributes(void const *kernel_func) {
static hipFuncAttributes attr = [=]() {
hipFuncAttributes attr;
hipFuncGetAttributes(&attr, kernel_func);
Copy link
Member

Choose a reason for hiding this comment

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

Should this be error checked?

Copy link
Member Author

@CRobeck CRobeck Sep 23, 2021

Choose a reason for hiding this comment

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

I was looking for a HIP_SAFE_CALL macro defined but didn't see one. Do we have one? Should I add one?

Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +414 to +421
static unsigned int getKernelScratchBytes(
hipFuncAttributes const &hip_func_attributes) {
return hip_func_attributes.localSizeBytes;
}
static unsigned int getKernelRegisters(
hipFuncAttributes const &hip_func_attributes) {
return hip_func_attributes.numRegs;
}
Copy link
Member

Choose a reason for hiding this comment

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

spacing

adding error checking to hipFuncGetAttributes
@CRobeck CRobeck changed the title compile time kernel function information for hip kernel function information for hip Sep 23, 2021
@artv3
Copy link
Member

artv3 commented Sep 27, 2021

Cool! Is this something that could also be used within the RAJA Teams framework?

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.

None yet

3 participants