mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
* Improve Functionality of Harness In the harness we previously were able to determine whether or not a device supports the half or double data types, but doing so required unintuitive function calls and would need to be repeated per test. A new pair of functions have been added which clearly state what they do, and makes it easier to determine whether or not a device supports the types. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * Remove Old GetKernelArgInfo Tests (#522) In the API test suite we have 2 versions which test the clGetKernelArgInfo API. As part of this ticket we are redesigning the implementation of this test. This change removes all of the old code and makes it so that the tests simply pass. A later commit will add the redesigned test Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * Redesign GetKernelArgInfo (#522) The previous test for this API consisted of 5K+ lines of code which would define the test kernels and the expected outputs from this API. This redesign instead generates the kernels and expected outputs leading to incresased maintanability and a significantly reduce line-of-code count. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Address Review Comments This commit does the following: 1) Update the Copyright to 2021 2) Fixes a typo in a comment 3) Explicitly declares a vector variable (previously auto) 4) Output subtest result after completion rather than all of them at the end Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Ensure Kernel Arguments do not exceed CL_DEVICE_MAX_PARAMETER_SIZE As per upstream comments, this change ensures that the total size of parameters passed into a kernel does not exceed the limit specified by CL_DEVICE_MAX_PARAMETER_SIZE for the device used. Additionally this change replaces ASSERT_SUCCESS() with test_error() as per upstream requests. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Address Image and Vector Failures This change aligns vector 3 types to be sized 4. Additionally it ensures that image arguments do not have the address space qualifier specified because they are by default in the __global space. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Ensure that the size of pipe arguments are correct As mentioned in PR comments, the test previously assumed that sizeof(char) == sizeof(pipe char). The Clang implementation treats a pipe to take the same size as a pointer, which is now reflected in the code. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Ensure that CL_DEVICE_MAX_PIPE_ARGS is not Exceeded This commit refactors the code so that Pipes are handled separately. Additionally, it removes signed char and char signed as scalar types to test and removes some redundent code for modifiying the expected type when processing unsigned scalar types. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Remove compatibility test from skip-list There is a list of tests which should be skipped when using an offline compiler. As get_kernel_arg_compatibility has been removed, it should also be removed here. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Disable Pipe Tests This change disables the Pipe tests for clGetKernelArgInfo as pipe metadata is not accurately reported on clang which leads to the pipe tests failing. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
This commit is contained in:
@@ -1756,3 +1756,26 @@ bool poll_until(unsigned timeout_ms, unsigned interval_ms,
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool device_supports_double(cl_device_id device)
|
||||
{
|
||||
if (is_extension_available(device, "cl_khr_fp64"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cl_device_fp_config double_fp_config;
|
||||
cl_int err = clGetDeviceInfo(device, CL_DEVICE_DOUBLE_FP_CONFIG,
|
||||
sizeof(double_fp_config),
|
||||
&double_fp_config, nullptr);
|
||||
test_error(err,
|
||||
"clGetDeviceInfo for CL_DEVICE_DOUBLE_FP_CONFIG failed");
|
||||
return double_fp_config != 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool device_supports_half(cl_device_id device)
|
||||
{
|
||||
return is_extension_available(device, "cl_khr_fp16");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user