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

Add OpenCL 3.0 API clGetKernelSuggestedLocalWorkSizeKHR. #230

Conversation

haonanya
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jan 31, 2024

CLA assistant check
All committers have signed the CLA.

@haonanya
Copy link
Author

@bashbaug , this is for #229, can you please help enable CI? Thanks very much.

image

@Kerilk
Copy link
Contributor

Kerilk commented Jan 31, 2024

Thanks for suggesting this change. If we were to consider adding this to the dispatch table, it would first need to be added here:
https://github.com/KhronosGroup/OpenCL-Headers/blob/main/CL/cl_icd.h

Also the print layer code would have to be generated and updated as well.

@Kerilk
Copy link
Contributor

Kerilk commented Jan 31, 2024

To be completely honest with you, I don't see this change moving further unless KhronosGroup/OpenCL-Docs#1003 is adopted and we do a major release.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

I don't think we should be doing this. Frankly, I think it was a mistake to put any extension APIs into the OpenCL ICD loader. It is too late to change this for the extension APIs that are already in the ICD loader, because we want to stay compatible, but we shouldn't be doing this for any extension APIs going forward.

See:

// Most extensions, including multi-vendor KHR and EXT extensions,
// do not need to be ICD-aware and do not require any ICD loader
// modifications. The KHR and EXT extensions below were added for
// backwards compatibility only.

Instead, to call an extension API an application should query the extension function pointer using clGetExtensionFunctionAddressForPlatform. This can be done "manually" in the application code itself, or it can be done via a helper library, like the one in the OpenCL SDK:

https://github.com/KhronosGroup/OpenCL-SDK/tree/main/lib/src/Extensions

@haonanya
Copy link
Author

haonanya commented Feb 1, 2024

Thanks @bashbaug and @Kerilk , I will close the PR and issue.

@haonanya haonanya closed this Feb 1, 2024
@haonanya haonanya deleted the clGetKernelSuggestedLocalWorkSizeKHR branch September 24, 2024 06:35
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.

5 participants