fix generic_address_space, command_buffer_event_sync, test_compiler and images/test_1D_buffer (#2062)

fixes several issues:

* `generic_address_space` test: add check for program scope variables.
The test uses both generic AS and program-scope variables, however it
only checked the generic-AS presence in `clGetDeviceInfo`.
* `compiler/test_compiler_defines_for_extensions.cpp`: add
`cl_khr_command_buffer_multi_device` to the list of recognized
extensions
* `command_buffer_event_sync.cpp`: add delays for testing
`clSetEventCallback` - according to specification, these can be executed
asynchronously (in a separate thread) by the OpenCL implementation,
hence the event callback is not quaranteed to be called before
`clFinish()` returns. Existing test `events/test_callbacks.cpp` also
waits for callback with loops of usleep.
* `images/kernel_image_methods/test_1D_buffer.cpp`: fix allocation size
being too small for the 1D buffer backing the image

---------

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
This commit is contained in:
Michal Babej
2024-10-01 19:26:39 +03:00
committed by GitHub
parent 97cf4c7e25
commit 2be73b2be1
3 changed files with 33 additions and 1 deletions

View File

@@ -18,6 +18,8 @@
#include "procs.h"
#include <vector>
#include <thread>
#include <chrono>
//--------------------------------------------------------------------------
enum class EventMode
@@ -416,6 +418,12 @@ struct CommandBufferEventSync : public BasicCommandBufferTest
error = clFinish(queue);
test_error(error, "clFinish failed");
for (unsigned i = 0; i < 30; ++i)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
if (confirmation) break;
}
// verify the result
if (!confirmation)
{
@@ -763,6 +771,12 @@ struct CommandBufferEventSync : public BasicCommandBufferTest
error = clFinish(queue);
test_error(error, "clFinish failed");
for (unsigned i = 0; i < 30; ++i)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
if (confirmation) break;
}
// verify the result
if (!confirmation)
{