-
Notifications
You must be signed in to change notification settings - Fork 199
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 cl_khr_fp16 extension support for test_explicit_s2v from basic #1713
Conversation
…M architecture tests
Regarding
I'm also seeing this error locally: ERROR: Output value 0:0 does not validate for size 2:2!
Input: 0x4dbe2551
Actual: 0x7c007c00 0x7c007c00 0x7c007c00 0x7c007c00
ERROR: Explicit cast of scalar float to vector half2 FAILED; skipping other half vector tests
|
@EwanC I just added missing part of |
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.
Passes for me now 🙂 HALF_ROUND_CASE
has a lot of code duplication with FLOAT_ROUND_CASE
& DOUBLE_ROUND_CASE
which would be nice to improve upon but i'm okay with the change without it.
Reviewing |
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 test is failing (on below kernel) with an error that cl_khr_fp16 is not enabled. Can we add the pragma for kernels that use half?
__kernel void test_conversion(__global float *sourceValues, __global half2 *destValues )
{
int tid = get_global_id(0);
float src = sourceValues[tid];destValues[tid] = (half2)src; }
|
||
#include "procs.h" | ||
#include "harness/conversions.h" | ||
#include "harness/typeWrappers.h" | ||
|
||
// clang-format off | ||
|
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.
Needs "#pragma OPENCL EXTENSION cl_khr_fp16 : enable\n" here.
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.
Corrected - good find, thanks!
We are seeing failures with the latest commit. Debugging at our end. Need some more time. |
Added a patch that does the NAN check. |
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.
Seems OK but I have a few questions, mostly around NaN handling.
The additional test coverage does increase the runtime of this sub-test, but it still runs in ~30 seconds on my system so probably not worth worrying about (yet).
Discussed in the October 3rd teleconference. Will wait a week to address the comments above. |
Use std::isnan for float/double types. Change-Id: I005bddccaa3f8490ac59b2aa431ed315733ad143
Change-Id: I671ed826a9631fbbc66d0aa9b674ab00124c7967
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.
LGTM with one small nice-to-have - thanks!
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.
Merging as discussed in the October 17th teleconference.
According to issue description (basic section):
#142
Additional remark (1): original test skips conversions between different types, in other words supported conversions were eg.
char scalar
->char vector
,int scalar
->int vector
,float scalar
->float vector
and so on. This PR extend the scope of original test tointegral scalar types
->integral vector types
,floating scalar types
->floating vector types
Additional remark (2): test fails with my Intel device and kernel with
half
conversions:ERROR: Explicit cast of scalar float to vector half2 FAILED; skipping other half vector tests
I will appreciate additional attention when it comes to testing
cl_khr_fp16
with this test