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

[HIP][CUDA] local size bytes #2634

Open
jinz2014 opened this issue Jan 28, 2025 · 1 comment
Open

[HIP][CUDA] local size bytes #2634

jinz2014 opened this issue Jan 28, 2025 · 1 comment
Assignees
Labels
cuda CUDA adapter specific issues hip HIP adapter specific issues specification Changes or additions to the specification

Comments

@jinz2014
Copy link

HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES | The local memory usage of each thread by this function in bytes.
HIP_FUNC_ATTRIBUTE_NUM_REGS | The number of registers used by each thread of this function.

When the local size bytes is the memory usage of each thread, should the following case be moved to "urKernelGetInfo" ?

  case UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE: {
    // OpenCL PRIVATE == CUDA LOCAL
    int Bytes = 0;
    UR_CHECK_ERROR(cuFuncGetAttribute(
        &Bytes, CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, hKernel->get()));
    return ReturnValue(uint64_t(Bytes));
@kbenzie kbenzie added hip HIP adapter specific issues cuda CUDA adapter specific issues labels Jan 29, 2025
@jinz2014 jinz2014 changed the title [HIP] local size bytes [HIP][CUDA] local size bytes Feb 5, 2025
@npmiller npmiller added the specification Changes or additions to the specification label Feb 18, 2025
@npmiller
Copy link
Contributor

This is more of a specification change proposal, essentially to move UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE from ur_kernel_group_info_t to ur_kernel_info_t.

We couldn't change it just for HIP and CUDA.

We would need to check if this is possible for all targets, but in theory I think it makes sense this information shouldn't be affected by the work size, so it shouldn't need to be in the group info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA adapter specific issues hip HIP adapter specific issues specification Changes or additions to the specification
Projects
None yet
Development

No branches or pull requests

3 participants