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

Use strstr to check if fp16 supported #1611

Merged
merged 2 commits into from
May 28, 2023

Conversation

howard0su
Copy link
Collaborator

No description provided.

@KerfuffleV2
Copy link
Collaborator

Is clGetDeviceInfo with CL_DEVICE_EXTENSIONS guaranteed to terminate its result with \0?

Doesn't seem completely clear from the docs here: https://man.opencl.org/clGetDeviceInfo.html

If not, then it wouldn't be safe to use string functions like strstr,

@howard0su
Copy link
Collaborator Author

Is clGetDeviceInfo with CL_DEVICE_EXTENSIONS guaranteed to terminate its result with \0?

Doesn't seem completely clear from the docs here: https://man.opencl.org/clGetDeviceInfo.html

If not, then it wouldn't be safe to use string functions like strstr,

Upon reviewing the OpenCL 3.0 specification, I found that it does not explicitly mention whether the CL_DEVICE_EXTENSIONS string returned by clGetDeviceInfo is guaranteed to be null-terminated. The specification only states that the returned value is a "space-separated list of extension names" without specifying the null-termination.

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