Commit Graph

1053 Commits

Author SHA1 Message Date
Sven van Haastregt
8e74722a0a cmake: Fix -Wno- handling in add_cxx_flag_if_supported (#1656)
The `-Wno-...` compiler flags only result in a diagnostic if another
diagnostic is emitted.  When passing such flags to
`add_cxx_flag_if_supported` (and `check_cxx_compiler_flag`), the test
would always succeed.  For such cases, test the `-W...` flag instead
of the `-Wno-...` flag.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-29 11:10:27 +01:00
Ahmed
9afb918bf5 Disable vendor extension formats from image_from_buffer_fill_positive as the verification step is incorrect and can cause seg fault, e.g. for YUV images (#1657) 2023-03-28 09:16:15 -07:00
Ahmed
14f421e54b Fix slice pitch for 1D array images on image_from_buffer_read_positive kernel_read_write images subtest (#1654) 2023-03-28 09:15:33 -07:00
Sreelakshmi Haridas Maruthur
868de6c15e test_harness: Update test status upon api failure (#1615)
Co-authored-by: Vasu Penugonda <vpenugon@qti.qualcomm.com>
2023-03-28 09:14:47 -07:00
Marcin Hajder
20ab003053 Added cl_half support for test_printf (#1622)
* Added support to test half floats with printf calls (issue #142, printf)

* Added corrections related to rounding and casting halfs (issue #142, printf)

* Reusing similar function (issue #142, printf)

* Corrected path without cl_khr_fp16 support (issue #142, printf)

* Cosmetic fix for order of vector tests (issue #142, printf)

* Added correction related to vendor test review (issue #142, printf)
2023-03-28 08:57:03 -07:00
Marcin Hajder
f537c40abc clGetCommandBufferInfoKHR test cases for cl_khr_command_buffer extension (#1611)
* Added initial commit for issue #1369, p.1.4

* Added support for clGetCommandBufferInfoKHR test cases (issue #1369, p.1.3)

* Added correction for CL_COMMAND_BUFFER_QUEUES_KHR query test (issue #1369, p.1.4)

* Added corrections related to changed orders of operations Skip/SetUp and code review (issue #1369, clGetCommandBufferInfoKHR)

* Added cosmetic correction related to printout messages (issue #1369, clGetCommandBufferInfoKHR)

* Corrected info_prop_array test to accept scenario without simultaneous use (issue #1369, p.1.4)

* Added protection test agains POCL unexpected values (issue #1369, p.1.4)

* Added corrections related to Ben's code review
2023-03-28 08:41:41 -07:00
Sven van Haastregt
8352966818 [NFC] Remove unused imagePtr variable (#1682)
This variable is shadowed by another variable further down.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-27 12:03:07 +01:00
Sven van Haastregt
c3d36bf9fb [CI] Upgrade to actions/checkout@v3 (#1677)
Node.js 12 actions are deprecated, so update to v3 which uses Node 16.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-22 11:21:23 +00:00
Paweł Jastrzębski
3478f3d304 Add mutable dispatch tests. (#1651)
* Add mutable dispatch tests.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Mutable dispatch buffer tests redesigned to inherit from command buffer tests.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Add remaining tests for clGetMutableCommandInfoKHR.

Added tests for missing queries:
* CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR
* CL_MUTABLE_DISPATCH_KERNEL_KHR
* CL_MUTABLE_DISPATCH_DIMENSIONS_KHR

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Minor code cleanup.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Introduce review changes.

Introduce changes requested in review:
- Remove bitwise chceck for CL_DEVICE_MUTABLE_DISPATCH_CAPABILITIES_KHR
- Add error check for clFinalizeCommandBufferKHR
- Add global_work_size to clCommandNDRangeKernelKHR for CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR
- Move BasicMutableCommandBufferTest to a separate header file
- Change name of file command_buffer_test_mutable_dispatch.cpp to mutable_command_info.cpp

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Set global_work_size on every use of clCommandNDRangeKernelKHR.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Apply changes for review.

- Add error check for init_extension_functions()
- Check mutable_capabilities for non-zero
- Replace clKernelWrapper with cl_kernel for CL_MUTABLE_DISPATCH_KERNEL_KHR test
- Replace clCommandBufferWrapper with cl_command_buffer_khr for CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR test
- Remove unneded test_command_buffer declarations
- Check type for CL_MUTABLE_COMMAND_COMMAND_TYPE_KHR
- Remove retain() from operator= in clCommandBufferWrapper

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Apply changes for review.

Apply changes for review:
- Fix header guards
- Add copyright header
- Change checks for test_kernel, test_queue

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-21 09:12:34 -07:00
Paweł Jastrzębski
63b0f441f1 Add external semaphore tests. (#1645)
* Add external semaphore tests.

Added basic test to check the functionality of cl_ext_external_semaphore_test extension.
Tests rely on Vulkan API as the producer of the external semaphore functionality. The
Vulkan wrapper has been copied from the Vulkan CTS tests and minor changes have been
introduced. A separate copy of the Vulkan wrapper is for breaking any dependencies
between different CTS modules and thus make the build system simpler.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix clang-format

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Move vulkan wrapper to a separate library.

Vulkan wrapper is extracted as a separate module and can be used in different
CTS tests as a shared library.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Add cl_ext_external_samaphore tests based on cl_khr_semaphore tests.

Added cl_khr_semaphore adjusted to creating semaphores in Vulkan context
and importing them through export semaphore functionality in OpenCL
(cl_ext_external_samaphore).

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Cleanup.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix build issues.

* Add missing directories for build cl_ext_external_semaphore.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Set Vulkan lib directory.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Change extension directory name.

Changed extensions directory name from cl_ext_external_semaphore to cl_khr_external_semaphore.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Remove unneeded compile options.

Removed VK_USE_PLATFORM_WIN32_KHR option from cl_khr_external_semaphore
compilation arguments.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-21 09:06:15 -07:00
Sven van Haastregt
b7f2dd58e9 math_brute_force: Drop BuildKernelInfo2 (#1634)
Replace occurrences of `BuildKernelInfo2` with `BuildKernelInfo`.
This aligns the kernel creation code of the non-threaded tests to
the kernel creation code of the threaded tests.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-20 09:44:25 +00:00
Kévin Petit
9755c7ac58 [NFC] Only assign gIsEmbedded in the test harness (#1672)
Signed-off-by: Kévin Petit <kpet@free.fr>
2023-03-16 12:15:51 +00:00
Kévin Petit
1f94b5748b [NFC] Remove duplicate symbol declarations (#1671)
* [NFC] Remove duplicate symbol declarations

Those are provided by testHarness.h.

Signed-off-by: Kévin Petit <kpet@free.fr>

* add missing include

---------

Signed-off-by: Kévin Petit <kpet@free.fr>
2023-03-16 12:15:37 +00:00
Sven van Haastregt
9e0369b307 [NFC] Remove unused printMe variable (#1674)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-16 06:23:06 +00:00
Sven van Haastregt
9798a96a9f [NFC] Fix some sign-compare warnings (#1670)
In `os_helpers.cpp`, the preceding `if` already handles negative
values, so cast to unsigned.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-12 11:06:55 +00:00
paulfradgley
5297ecd673 Add compiler test external memory/semaphore extensions (#1662)
The OpenCL Headers have cl_khr_external_memory_dx, cl_khr_external_memory_dma_buf and cl_khr_external_semaphore_dx_fence as extension strings, but CTS Compiler fails if an implementation says that it supports them.
2023-03-07 09:54:15 -08:00
Paweł Jastrzębski
e882a3dc5e Move semaphore tests from api to extensions (#1646)
* Move semaphore tests from api to extensions

Moved cl_khr_semaphore tests from core api tests to a separate
extension test as suggested in
https://github.com/KhronosGroup/OpenCL-CTS/issues/1588 .

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix clang-format

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Remove unneeded comment.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-07 09:00:16 -08:00
Marcin Hajder
0b44338eda clSetKernelArg test cases for cl_khr_command_buffer extenstion (#1593)
* Initial commit for clSetKernelArg test case (issue #1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added simultaneous version of clSetKernelArg test, (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added/corrected comments (#1369, p.1.7)

* Corrected logic of conditions of command-buffer simultaneous use (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added missing comment for consistency with other command-buffer tests

* Cleanup related to code review (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added clang format correction

* Removed redundant code (issue #1369 clSetKernelArg)
2023-03-06 10:30:27 +00:00
Sven van Haastregt
712eb4f988 gl: Fix array size expression (#1610)
`sizes` is a pointer argument, so the expression does not compute the
presumably intended number of elements in `sizes`.

Fixes a `-Wsizeof-pointer-div` warning.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-03 13:29:29 +00:00
Marcin Hajder
33285facbe Command buffer event sync (#1606)
* Added initial commit for event sync test cases (issue #1369, p.3.3)

* Added test cases for return event scenarios with and without out-of-order, work in progress (#1369, p.3.3)

* Added support for return event test cases for both regular and out-of-order command queue (#1369, p.3.3)

* Added user event test cases, cosmetic corrections (#1369, p.3.3)

* Added correction for windows build (#1369, p.3.3)

* Corrected proper testing of test fail/skip conditions (#1369, p.3.3)

* Added corrections related to PR review (#1369, p.3.3)

* Added correction related to change of order Skip/SetUp (issue #1369, event sync)

* Added clang format correction for previous commit

* Reordered initialization of attributes.
2023-03-03 08:20:46 +00:00
Sven van Haastregt
dc8ee495bd [NFC] Fix -Wmissing-braces warnings (#1643)
The `cl_*` types need two levels of braces for initialization: the
outer braces for the union and the inner braces for the array.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-02 09:28:51 +00:00
victzhan
75db137822 Change order of print statement (#1631)
* Change order of print statement

* Made change for test_imagearraycopy3d.cpp as well

* Update test_imagearraycopy.cpp
2023-03-02 09:26:49 +00:00
Marcin Hajder
531e5e82f9 Out-of-order command-queue test cases for cl_khr_command_buffer (#1596)
* Initial commit for out-of-order test cases (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added support for simultaneous test of out-of-order command buffers and queues (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Cosmetic fixes (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Corrected two bugs related to simultaneous test (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added additional event to synchronize symultaneous passes, cosmetic fixes (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Cosmetic fix due to consistency concerns (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Fix for prev commit

* Added corrections related to changed order of Skip/SetUp methods (issue #1369, 2.0 out-of-order)

* Reverted formating of unrelated header

* Reverted formating of unrelated header, correction

* Reordered initialization of attributes.
2023-03-02 09:16:32 +00:00
Ben Ashbaugh
e71a7bce68 Revert "Image streams optimization (#1616)" (#1638)
This reverts commit b73c3149ad.
2023-02-28 09:06:34 -08:00
Nikhil Joshi
df3c4fae95 Enable test_vulkan by default in presubmit (#1655)
test_vulkan is disabled by default as part of
PR #1530.
Given the ongoing development to test_vulkan,
it is important to have this enabled in CI builds
to avoid breaking test builds.
Enable the test build as part of presubmit script.
2023-02-28 08:51:22 -08:00
Sven van Haastregt
2c9526f9a5 [NFC] Fix multi-line comment warnings (#1641)
Disabling of frem and fmod by b81b49e1 ("spirv: disable frem and fmod
tests for now (#1614)", 2023-02-07) introduced some new warnings about
multi-line `//` comments due to the trailing backslashes.  Fix these.

Also fix a typo.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-02-24 15:44:59 +00:00
Marcin Hajder
296a7a574d Command buffer profiling (#1598)
* Added test cases for profiling command-buffers according to issue description #1369, p.3.2:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added cosmetic fixes (#1369, p.3.2)

* Corrected the path of initialization profiling event for simultaneous test (#1369, p.3.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* clang format fix

* Added correction related to macos build error (#1369, p.3.2)

* Applied corrections related to code review (#1369, p.3.2)

* Corrected query of queue properies (issue #1369, command buffer profiling)

* Reverted formating of unrelated header

* Added code review corrections for type consistency and fail condition (issue #1369, p.3.2)

* Reordered initialization of attributes.

* Reverted correct order of initialization.
2023-02-21 09:05:17 +00:00
Paweł Jastrzębski
fa2c1d2417 Add test for clGetEventInfo info queries. (#1647)
* Add test for clGetEventInfo info queries.

Test clGetEventInfo() info queries from event returned by command-buffer
enqueue for the single command-queue to command-buffer case:
* CL_EVENT_COMMAND_TYPE is CL_COMMAND_COMMAND_BUFFER_KHR
* CL_EVENT_COMMAND_QUEUE
* CL_EVENT_CONTEXT
* CL_EVENT_COMMAND_EXECUTION_STATUS
* CL_EVENT_REFERENCE_COUNT

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix return TEST_FAIL instead of -1.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-02-20 16:19:11 +00:00
Sven van Haastregt
61ec521b1c [NFC] Fix BasicCommandBufferTest initialization order (#1628)
The `command_buffer` member is initialized with `this`, and should
thus be initialized after all other members have been initialized, to
avoid any potential uninitialized data accesses by `command_buffer`'s
constructor.  This is currently not a problem, but would become a
problem when `command_buffer`'s constructor accesses the object
through its parameter.

Fixes a -Wreorder warning.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-02-20 11:39:18 +00:00
Paweł Jastrzębski
560d6eafbd Added tests for 1.1 individual command entry-points. (#1594)
* Added tests for 1.1 individual command entry-points.

* Adding fixes pointed out in review: checks for CL_DEVICE_IMAGE_SUPPORT, remove redundant buffers, synchronisation issues, fixed clang-format, other minor issues.

* Fix compilation issues for Windows and macOS, fix clang-format.

* Fix compilation issue for Windows.

* Removed redundant blocking and event operations.

* Style fixes for test skip conditions.

* Fix clang format.

* Fixed function names, file names, comments and barrier test.

* Restored Individual command entry-points tests after merge with main.

* Fix clang format.

* Superficial fixes for review.
* Fix Skip() condition for barrier test
* Fix typos
* Fix new line

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-02-20 08:36:34 +00:00
Karol Herbst
b81b49e10e spirv: disable frem and fmod tests for now (#1614)
The OpenCL SPIR-V Environment Specification does not require the SPIR-V
opcodes `OpFMod` and `OpFRem` to match any OpenCL C semantics, so
implementations implementing those two instructions according to Vulkan
and/or OpenGL semantics will fail those tests without actually violating
any OpenCL specification.

We should keep those tests disabled until we figure out what the actual
precision requierement should be and update the test accordingly.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
2023-02-07 09:08:29 -08:00
Sven van Haastregt
1e5b5c96e2 math_brute_force: Remove unnecessary gotos (#1605)
Simplify code by returning directly instead of using goto statements.

Although intended as an NFC commit, this changes the behaviour around
clFlush calls.  Before this commit, failure of the third clFlush call
would print "clFlush 3 failed" and return the clFlush error code.
This behaviour is inconsistent with the other clFlush calls in
math_brute_force, which are not fatal.  The lack of a `goto exit`
makes me suspect that this 3rd clFlush call was intended to be
non-fatal too.  As such, this commit makes all clFlush calls non-fatal
by returning `CL_SUCCESS` even when the third clFlush call fails.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-02-07 09:01:07 -08:00
Paweł Jastrzębski
11782f7650 Fixed EnqueueAcquire and EnqueueRelease calls to be compliant with the spec. (#1629) 2023-02-07 08:58:48 -08:00
Chip Davis
b73c3149ad Image streams optimization (#1616)
* Don't recalculate image parameters repeatedly in `test_read_image()`

We've already done this in the loop. There's no need to recalculate
those parameters over and over again in `sample_image_pixel*()` and
`read_image_pixel*()`. This should save some work during the image
streams test.

This only affects the 3D tests for now, but my time profiles indicate
this is where we spend the most time anyway.

* Vectorize read_image_pixel_float() and sample_image_pixel_float() for SSE/AVX

This shortens the image streams test time from 45 minutes without it to
37 minutes. Unfortunately, most of the time is now spent waiting for
memory, particularly in the 3D tests, because the 3D image doesn't
neatly fit in the cache, especially in the linear sampling case, where
pixels from two 2D slices must be sampled. Software prefetching won't
help; it only helps when execution time is dominated by operations, but
this is dominated by memory access. Randomized offsets are likely a
factor, because they throw off the hardware prefetcher.

One possible further optimization is, in the linear sampling case, to
load two sampled pixels at once. This is easy to do using AVX, which
extends SSE with 256-bit vectors.

Obviously, this only applies to x86 CPUs with SSE2. The greatest
performance gains, however, are seen with SSE4.1. Most modern x86 CPus
have SSE4. Work is needed to support other CPUs' vector units--ARM
Advanced SIMD/NEON is probably the most important one. Another
possibility is arranging the code so that the compiler's
autovectorization will kick in and do what I did here manually.
2023-02-07 08:46:15 -08:00
Sven van Haastregt
f46cca0f8f [NFC] clang-format gl (#1612)
Add some clang-format off/on comments to keep kernel code readable.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-02-06 15:09:04 +00:00
Sven van Haastregt
2318cedb21 select: Use MTdataHolder (#1609)
Simplify code by avoiding manual resource management.

This fixes use of an uninitialized `d` in the `free_mtdata` call, in
the case a `goto exit` was executed before initializing `d`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-31 09:50:21 -08:00
Finlay
691a45d605 c11 atomic fence: relaxed requirements for an auxiliary atomic_store (#1603) 2023-01-31 09:47:47 -08:00
Stuart Brady
68fcb5904f Avoid use of rand in test_rw_image_access_qualifier (#1322)
There is no particular reason to limit the domain of unsigned 32-bit
integers in the input, so use genrand_int32 directly.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2023-01-31 09:42:45 -08:00
Sven van Haastregt
2cc8e2e593 Fix -Woverloaded-virtual warnings (#1599)
Align `verify_data` with `checker_image_mem_host_read_only.hpp`, that
is, take an explicit pointer to compare against.

Add a missing (but unused) `float` parameter to
`KernelArgSampler::compare`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-27 16:34:22 +00:00
Sven van Haastregt
9eec8f3352 Suppress -Wdeprecated-declarations for macOS (#1627)
Xcode 14 deprecated functions such as `sprintf` which is used in many
places.  As an immediate fix for the pre-commit checks, disable
deprecated function warnings when building for macOS.

Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/1626

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-27 13:34:50 +00:00
Marcin Hajder
afdd8b0058 Command buffer queue substitution (#1584)
* Added queue substitution CTS test based on issue: https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added cosmetic correction to properties_queue_substitution test, work in progress:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added support for simultaneous queue substitution test (1.3.3), more cosmetic corrections added:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added initial rearrangement of source files due to more test cases to be implemented.

* Corrected test with queue properties out-of-order:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added alternative temporary path for simultenaous pass (USE_COMMAND_BUF_KENEL_ARG):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* applied git clang-format "origin/main"

* Added corrections for out-of-order property scenario, couple cosmetic fixes:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Replaced cl_command_queue with clCommandQueueWrapper for additional command queue with properties:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Removed unnecessary flag, additional cleanup:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added narrowing correction due to windows build fail:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Test simiplified in order to use only substitute queue on both simultaneous buffers:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added limitation to use only CL_QUEUE_PROFILING_ENABLE property, replaced cl_command_queue with related wrapper (#1369, p.1.4)

* Corrections related to order of operations due to code review (issue #1369, p.1.3)

* Cosmetic fix for prev commit

* Cosmetic fix for prev commit #2
2023-01-24 09:44:16 -08:00
Steven Winston
ea49084976 Conversions (#1555)
* grab latest from upstream OpenCL

* Removed events for host to device data transfers

* grab latest from upstream OpenCL

* 1.) revert changes to CMakeLists.txt and run_batch script in hopes this will solve the CI issues for the PR.
2.) resolve the merge conflict in test_conversions.cpp

* 1.) resolve 2 additional merge conflicts

* 1.) resolve 1 additional merge conflicts

* locally this fails clang-format but CI version seems to require it.

* fix the warning.

* Remove now-unused event

Also, cut down a comment that is no longer accurate.

Co-authored-by: Joshua Luceno <joshualuceno@gmail.com>
Co-authored-by: Chip Davis <chip@holochip.com>
Co-authored-by: Chip Davis <cdavis5x@gmail.com>
2023-01-24 08:53:18 -08:00
Steven Winston
4759159a50 Enqueue fill buffer (#1561)
* grab latest from upstream OpenCL

* Use clEnqueueFillBuffer rather than memset4 in all test files

* Cleanup leftover code from memset_pattern4

* Remove unnecessary map, unmap, writeBuffer from math_brute_force tests

* Remove extraneous build system change

* Appease clang-format

* Add option to perform buffer fills on the host

Co-authored-by: Taeten Prettyman <taeten.j@gmail.com>
Co-authored-by: taetenp <taet@holochip.com>
Co-authored-by: Chip Davis <chip@holochip.com>
2023-01-24 08:51:00 -08:00
Steven Winston
77e4fe5588 Half (#1554)
* Added on-device reset for half

* run clang-format.

* test_half - Reset buffer with ushort rather than half type

* Half - update type in secondary reset kernel src

* Remove useless memset() calls.

* Add an option to still perform buffer resets on the host

* Check for program generation failure before attempting to create the kernel

* Don't exceed the range of a ushort when storing

* Appease clang-format

Co-authored-by: Joshua Luceno <joshualuceno@gmail.com>
Co-authored-by: taetenp <taet@holochip.com>
Co-authored-by: Chip Davis <chip@holochip.com>
2023-01-24 08:48:53 -08:00
Sven van Haastregt
487dbd292e relationals: Use stringstream in print_hex_mem_dump (#1597)
print_hex_mem_dump was calling `sprintf` with source and destination
buffers overlapping, which is explicitly forbidden.  Rewrite the
function to use C++ stringstreams instead.

This commit only affects the error path and does not change the
printed output.  Error logs before and after this commit should not
differ.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-20 15:11:31 +00:00
Kévin Petit
1eeb10296f Get rid of threadTesting.h (#1604)
It only contains a pointer type definition for test functions that
really ought to be provided by testHarness.h.

Signed-off-by: Kévin Petit <kpet@free.fr>

Signed-off-by: Kévin Petit <kpet@free.fr>
2023-01-14 15:18:27 +00:00
Sven van Haastregt
896f43615d basic: Return error on unhandled image format (#1613)
Fail when an unhandled image format is encountered instead of
continuing validation with uninitialized variables.

Fixes a `-Wsometimes-uninitialized` warning for e.g. the `tolerance`
variable.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-11 10:25:30 +00:00
Sven van Haastregt
4278d544dc [NFC] clang-format mem_host_flags (#1607)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-01-09 16:07:09 +00:00
Sven van Haastregt
8066e69b11 [NFC] clang-format mem_host_flags/checker_image_mem_host_write_only.hpp (#1600)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-12-20 13:46:47 +00:00
Sven van Haastregt
59a1198e5f [NFC] commonfns: Remove unused values arrays (#1595)
The arrays were assigned to, but the values were never used again.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-12-14 07:34:30 -08:00