Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Added fp16 and fp64 api consistency tests #2058
Added fp16 and fp64 api consistency tests #2058
Changes from all commits
24b89fa
fee23ab
167ba83
0b8d74a
f106fa7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we go in with eyes open: this change requires
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
to be non-zero when fp64 is supported. This is true even if there is no "native" double precision support, say whenCL_DEVICE_DOUBLE_FP_CONFIG
includesCL_FP_SOFT_FLOAT
.No action required, but if we did want to "fix" this, some options might be:
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
when fp64 is supported. Note, there is a requirement when fp64 is NOT supported, so this check should not change.CL_DEVICE_DOUBLE_FP_CONFIG
does not includeCL_FP_SOFT_FLOAT
, since there should be some "native" support in this case.Same comments also apply to fp16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in the October 1st teleconference. We are going to leave this as-is for now. We will revisit in the future, if needed, if a vendor wants to return zero for
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
and still support fp64 for some reason.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires implementations without the
cl_khr_fp16
extension to recogniseCL_DEVICE_HALF_FP_CONFIG
, but support forCL_DEVICE_HALF_FP_CONFIG
is only required if that extension is available, is it not? https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_DEVICE_HALF_FP_CONFIG says "provided by the cl_khr_fp16 extension". Our implementation, when FP16 support is disabled, returnsCL_INVALID_VALUE
here rather than settingvalue
to0
, and I think that is correct, since the spec also says it returns:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvdijk I agree with your analysis.
CL_DEVICE_HALF_FP_CONFIG
is provided by thecl_khr_fp16
extension, so if that extension is not supported the query should returnCL_INVALID_VALUE
indeed.(the half query seems different from
CL_DEVICE_DOUBLE_FP_CONFIG
, which does not have a "provided by" clause)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, created #2108 to change that.