Hello.
I'm trying 'max_constant_size attribute' to optimize OpenCL performance.
But compiler(clBuildProgram) ignored this attribute. Can I have any workaround?
Regards,
source code
kernel void mykernel(global int* a, constant int* b __attribute__((max_constant_size (65536))) ){ size_t idx = get_global_id(0); a[idx] = b[idx & 0x3FFF]; } |
compiler message
error: unknown attribute 'max_constant_size' ignored [-Werror,-Wunknown-attributes] |
My platform
Ubuntu 22.04.1 LTS ROCm 5.3.0 Radeon Pro VII |
Solved! Go to Solution.
Here is the OpenCL team's feedback on this:
"The "max_constant_size" attribute is not a standard OpenCL attribute. Maybe it was supported by the earlier compiler tool-chains like AMDIL or HSAIL, however the current OpenCL compiler does not support this attribute.
It is to note that it would have little benefit for current AMD GPUs."
Hi @cozy ,
Thank you for the query. I have whitelisted you and moved the post to the AMD OpenCL forum.
Thanks.
I have forwarded the query to the OpenCL team. I will let you know once I get any feedback from them.
Please note, ROCm related support is provided at the ROCm GitHub site itself. Here is the link to post any query/issue related to ROCm: https://github.com/RadeonOpenCompute/ROCm/issues
Thanks.
Thank you for your response.
Sorry, I didn't know that support site.
Thanks.
Here is the OpenCL team's feedback on this:
"The "max_constant_size" attribute is not a standard OpenCL attribute. Maybe it was supported by the earlier compiler tool-chains like AMDIL or HSAIL, however the current OpenCL compiler does not support this attribute.
It is to note that it would have little benefit for current AMD GPUs."
I understand. Thank you for your reply.
Please give my regards to OpenCL team.