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

Number of VGPRs and SGPRs vs. hipDeviceProp_t::regsPerBlock #3356

Closed
maartenarnst opened this issue Nov 2, 2023 · 4 comments
Closed

Number of VGPRs and SGPRs vs. hipDeviceProp_t::regsPerBlock #3356

maartenarnst opened this issue Nov 2, 2023 · 4 comments

Comments

@maartenarnst
Copy link

I have a question about the member variable regsPerBlock of the struct hipDeviceProp_t. The documentation indicates that this variable provides the "number of registers per block". My question is how to relate this number to the VGPRs and SGPRs? Is there a way to deduce these numbers separately? Thank you very much in advance.

@maartenarnst
Copy link
Author

Hi @yxsamliu. Thanks a lot for your help! That's indeed exactly what I was looking for.

In my code, I'm now retrieving the number of VGPRs and SGPRs from the comgr, by proceeding similarly as in the code in rocdevice.cpp that you had referred me to.

I found that most of the functions used in rocdevice.cpp are available from the api in amd_comgr/amd_comgr.h. However, the function getValueFromIsaMeta is in rocdevice.cpp but it appears it's not in amd_comgr/amd_comgr.h. So it might be a suggestion to try to include this function in amd_comgr/amd_comgr.h. I'd be happy to post it as a suggestion on a GitHub repository, but it seems RadeonOpenCompute/llvm-project/tree/amd-stg-open/amd/comgr doesn't accept issues.

@yxsamliu
Copy link
Contributor

comgr was migrated from https://github.com/RadeonOpenCompute/ROCm-CompilerSupport

You may open an issue there

@kjayapra-amd
Copy link
Contributor

Closing the issue, since this is not related to HIP.
Please open a ticket https://github.com/RadeonOpenCompute/ROCm-CompilerSupport here as @yxsamliu suggested.

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

No branches or pull requests

3 participants