Commit Graph

1363 Commits

Author SHA1 Message Date
Shilei Tian
556025ba14 Escape subnormal values (#1953)
Currently we don't escape subnormal values when generating image data.
In sampler read tests, we use `!=` to check the two values even when it
is floating-point data, which requires the two values are bitwise equal.
However, a sampler might flush subnormal values, causing the test case
to fail.

In this patch, when generating random image data, we escape subnormal
values.
2024-05-30 15:19:00 -07:00
Sven van Haastregt
75be6a3125 cl_khr_kernel_clock: fix builtin function names (#1968)
According to the
[specification](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#kernel-clock-functions),
the work_group and sub_group variants have an `_` in them.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
v2024-05-29-01
2024-05-29 15:14:17 -07:00
Sven van Haastregt
1d3ad8d791 mem_host_flags: check returned pointer for NULL (#1924)
The specification states that `clEnqueueMapImage` and
`clEnqueueMapBuffer` should return NULL on error. Ensure this is
checked.

This testing gap was caught by a compiler warning about `dataPtr` being
written but not read. With this fix, there are no more
Wunused-but-set-variable warnings in this test, so reenable the warning.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-05-29 15:11:32 -07:00
saurabhnv
6807e165d7 Import OpenCL exported semaphore in Vulkan (#1898)
Except for SYNC_FD, current implementation doesn't import exported
OpenCL semaphore in Vulkan and ends up doing signal and wait on
essentially two unrelated semaphores (one created in OpenCL and one in
Vulkan).
Since OpenCL exports the semaphore, import that in Vulkan to perform
signal/wait on the same underlying payload.
2024-05-28 10:20:25 -07:00
pkaur19
1433ffe515 Vulkan interop coverage (#1887)
Added Code changes for 1D, 1DList, 3D, 3DList and test cases.
2024-05-28 10:14:01 -07:00
Kamil-Goras-Mobica
d53d7bc559 Added negative tests for clCommandFill[Buffer, Image]KHR (#1944)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-28 08:39:01 -07:00
Kamil-Goras-Mobica
d3e3bdabaa Negative tests clCommandSvmMem[cpy, Fill]KHR (#1956)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-22 09:18:36 +01:00
Romaric Jodin
fe76832ec8 add missing header (#1966)
test_common/harness/integer_ops_test_info.h is using std::vector but is
not including the header.

This is breaking on Google internal CI.
2024-05-21 13:00:13 -07:00
Ahmed
cdf8d5e35e Add cl_khr_kernel_clock tests (#1960)
Adds cl_khr_kernel_clock test.

Also fixes failure in the compiler defines for extension compiler
subtest when cl_khr_kernel_clock is supported.
2024-05-21 08:49:49 -07:00
Sreelakshmi Haridas Maruthur
5ce18c3f5a basic: workaround MSVC compiler bug with post-increment operator (#1939)
Prevent the compiler from optimizing away initialization loops
2024-05-21 08:47:47 -07:00
Grzegorz Wawiorko
b377b8537b test allocations: restore small number of work items in case of reduction (#1932) 2024-05-21 08:46:14 -07:00
joshqti
4fceb78b93 Add acquire/release (#1899)
Add acquire/release commands where appropriate. This is related to 1886.
2024-05-21 08:45:41 -07:00
John Kesapides
fb39357911 Raw10/12 CTS tests (#1830)
Add support for cl_ext_image_raw10_raw12 testing
on test_image_streams.

Signed-off-by: John Kesapides <john.kesapides@arm.com>
2024-05-21 08:44:28 -07:00
niranjanjoshi121
0353c0bdbe Add negative test for test_svm size check (#1802)
Isuue #875 clarified that CL_INVALID_BUFFER_SIZE should be returned if
clCreateBuffer is passed a pointer returned by clSVMAlloc as its
host_ptr and the size of the buffer exceeds the size of the SVM
allocation.

Add a new negative test to ensure CL_INVALID_BUFFER_SIZE is returned
when the size of buffer exceeds the size of the SVM allocation.

Fixes #1701
2024-05-21 08:43:55 -07:00
Kamil-Goras-Mobica
9500c30492 Negative tests for commandCopyImage[ToBuffer]KHR (#1943)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-21 08:40:08 -07:00
Marcin Hajder
88a707dd13 Corrections for printf test with floating point limits arguments (#1940)
According to work plan from issue #1058
2024-05-21 08:38:04 -07:00
Kamil-Goras-Mobica
e6fec7417f Added negative tests for clCommandBarrierWithWaitListKHR (#1937)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-14 08:43:23 -07:00
Kamil-Goras-Mobica
5093ce5be5 Added negative test commandNDRangeKernel (#1936)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-14 08:42:46 -07:00
Sreelakshmi Haridas Maruthur
aa70c06d8f Fix build breakage introduced by #1911 (#1958) 2024-05-07 10:03:02 -07:00
Sven van Haastregt
46255db86f compiler: fix memory leak (#1950)
The `test_compiler compiler_defines_for_extensions` test did not free
all `malloc`'ed memory.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-26 16:32:03 +02:00
Kamil-Goras-Mobica
4c085dec4a Added negative tests for clEnqueueCommandBufferKHR (#1931)
* Added negative tests for clEnqueueCommandBufferKHR

* Added blocking the clEnqueueCommandBufferKHR call on a user event

* Added finalizing buffer before enqueuing
2024-04-21 23:45:33 -07:00
Kamil-Goras-Mobica
308fa6e78c Added negative tests for clRetainCommandBufferKHR, clReleaseCommandBu… (#1928)
* Added negative tests for clRetainCommandBufferKHR, clReleaseCommandBufferKHR, clFinalizeCommandBufferKHR

* Added blocking the clEnqueueCommandBufferKHR call on a user event

* Changed cl_event to clEventWrapper
2024-04-19 14:01:38 -07:00
Sven van Haastregt
7dc9593d88 test_vulkan: don't throw from destructors (#1947)
Only report an error (and include the error code), but don't throw an
exception as that would call `terminate`.  Failure to release
resources is not fatal in other parts of the CTS.

This fixes `-Wterminate` warnings:

  warning: ‘throw’ will always call ‘terminate’ [-Wterminate]
  note: in C++11 destructors default to ‘noexcept’

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-16 10:11:08 -07:00
Pedro Olsen Ferreira
43237f74a8 Remove dead code (#1946)
This is 7-year old CMake code that never did anything because the
function invocation is missing the PROPERTIES keyword.
Adding the keyword results in build errors, so just drop the dead code
since everything seems to be working without it anyway.
2024-04-16 08:54:28 -07:00
Pedro Olsen Ferreira
a977e35e0b Delete stale files (#1945)
These aren't included or built anywhere.
2024-04-16 08:53:59 -07:00
David Tobolik
61a220ff33 fix: move suggested_local_size to test_api (#1916) 2024-04-16 08:49:24 -07:00
Romaric Jodin
be8b56d949 Test IMAGE1D_BUFFER in more scenario (#1806)
* cl_copy_images

* cl_get_info

* cl_fill_image

* cl_read_write_image

* kernel_image_methods

* IMAGE1D_BUFFER cannot be created with (USE_|ALLOC_|COPY_)_HOST_PTR

* do not allow mipmap with 1D buffer

* adjust M to be within maximum_sizes and max_pixels

* remove unused variables

* make sure M will never be 0

* fix region[0] after refactoring removing mipmap

* fix formatting

* format with clang-format-11

* fix image1d_buffer creation with gEnablePitch

* add missing case in switch

* use align_malloc when CL version is at least 2.0

* use CL_DEVICE_NUMERIC_VERSION and align_free

* fix free of pitch buffer

* fix formatting

* fix formatting

* fix data->is_aligned
2024-04-16 08:48:05 -07:00
Kamil-Goras-Mobica
7fa567c7a5 Corrections for negative tests for function CreateCommandBufferKHR (#1915) 2024-04-16 08:40:44 -07:00
Sven van Haastregt
1139f54bde device_execution: fix -Wformat warnings (#1938)
Printing of a `size_t` requires the `%zu` specifier.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-15 13:37:07 +02:00
joshqti
48b987827e Fix cross-context semaphore signals (#1886)
Multi-context test was not correctly
testing cross-context functionality.
Use semaphore import/export mechanism
to signal across contexts.
2024-04-09 08:59:49 -07:00
Kamil-Goras-Mobica
d0300d176f Added negative tests for clGetCommandBufferInfoKHR (#1929)
* Added negative tests for clGetCommandBufferInfo

* Replaced param_value_size values from 0 to sizeof() - 1
2024-04-09 08:54:44 -07:00
Marcin Hajder
f2a30737b6 Corrections for mutable arguments tests (#1921)
* Corrections to mutable arguments tests

-added verification of device capabilities against mutable arguments
-corrected fail of 2 tests with Construction Kit
-general cleanup

* cleanup corrections

* restored relaxed version of mutable arguments tests

* corrections to strengthen the test around SVM arguments
2024-04-09 08:50:03 -07:00
Sven van Haastregt
5fe1cc01c0 spirv_new: fix -Wformat warnings (#1933)
`log_error` was invoked from a template function, but the format
specifiers weren't adjusted for the template parameter types.  Use a
stringstream for printing instead.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-05 12:28:20 +02:00
Ben Ashbaugh
27e47e9e87 fix the type used for bitfield_extract_signed (#1913)
We compute the reference values using unsigned types exclusively,
even when the input type is signed.  This fixes one place where
an signed type was inadvertently used.
2024-04-04 13:08:41 -07:00
Sven van Haastregt
48003e9d32 [NFC] subgroups: clarify bs128 to uint4 conversion (#1893)
There appears to have been some confusion over `uint_mask` during the
initial reviews of the subgroup tests.  Add a comment to clarify the
purpose of the mask.

Use a 32-bit all-ones mask (`0xffffffff`) instead of a 64-bit all-ones
mask to further clarify the intent, that is, don't delay discarding
the upper 32 bits until the assignment but mask them out immediately.

Fixes https://github.com/KhronosGroup/OpenCL-CTS/issues/1203

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-04-04 15:12:10 +02:00
saurabhnv
7f1caf4aa9 Shader -> SPIR-V at CTS build time (#1849) (#1878)
* Shader -> SPIR-V at CTS build time (#1849)

Instead of relying on prebuilt checked-in SPIR-V files, compile
available shaders at CTS build time.

* Add dependency on glslc (available as part of VULKAN_SDK).
* Add optional build flag BUILD_GLSL_SHADERS, OFF by default.

* Remove pre-built SPIR-V files

* Compile Shader -> SPIR-V at CTS build time

* Use glslangValidator for shader -> spirv

* Add glslangValidator tool for shader -> spirv

* Refactor glslangValidator tool retrieval

* Address review comments

* Use add_subdirectory() instead of include()
* Use glslang instead of glslangValidator
* Update Github actions CI to install Vulkan SDK
2024-04-02 10:16:45 -07:00
Sven van Haastregt
83203db6e2 half: fix -Wformat warnings (#1927)
Avoid casting to `uint64_t` in some places; instead keep the types as
`size_t` and use the `%z` length modifier, or as
`uint32_t` and use the `%u` specifier.

For printing of 64-bit types, use the `PRI*64` macros from <cinttypes>
to ensure portability across 32 and 64-bit builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-03-27 14:46:27 +01:00
Marcin Hajder
96361171ed Added test to cover iterative mutable argument update (#1925)
* Added test to cover iterative mutable argument update

According to issue description #1481

* cosmetic correction

* clang format fix

* Corrections due to code review
2024-03-26 08:39:18 -07:00
Marcin Hajder
349427e4aa Added test to cover overwritten update of mutable parameters (#1922)
* Added test to cover overwritten update of mutable parameters

According to issue description #1481

* cosmetic corrections

* Corrections due to code review
2024-03-26 08:38:38 -07:00
Sven van Haastregt
049b719eea relationals: fix -Wformat-truncation warning (#1918)
`inOrderStr` and `outOrderStr` are both written into `orderName`,
which may not fit as all three are the same size.  Decrease the sizes
of `inOrderStr` and `outOrderStr`.  The new sizes are still
sufficiently large to hold the result of `get_order_string`.

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>
2024-03-20 13:54:50 +01:00
Ahmed Hesham
0deddf2ce7 Fix failing image tests for CL_UNORM_INT_101010_2 (#1917)
Add support for `CL_UNORM_INT_101010_2` in the `get_pixel_size` helper
function. This fixes the following tests:
* memInfo_image_from_buffer_positive
* image_from_buffer_alignment_negative
* imageInfo_image_from_buffer_positive

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2024-03-20 11:30:36 +00:00
Marcin Hajder
da4a30d394 Added new test to cover multiple commands dispatch in one enqueued update (#1919)
* Added new test to cover multiple comands dispatch in one enqueued update

According to issue description #1481

* clang format correction

* Few minor corrections

* cosmetic corrections
2024-03-19 08:42:42 -07:00
Marcin Hajder
8f3ef0891d Added new tests for simultaneous use with mutable dispatch (#1912)
* Added new tests for simultaneous use with mutable dispatch

-cross queue simultaneous use
-in-order queue with simultaneous use

According to issue description #1481

* Several corrections applied:

-reordered Skip conditions to check valid simultaneous_use_support flag
-removed unnecessary SetUpKernel call
-initialize kernel and memory buffers from BasicCommandBufferTest
instead BasicMutableCommandBufferTest

* Corrections for command buffer creation to request simultaneous property
2024-03-19 08:41:41 -07:00
Ben Ashbaugh
109c0a1ddd configure depdendabot github actions version updates (#1923) 2024-03-19 07:10:19 -07:00
David Heidelberg
77293c83bd musl-libc doesn't provide GNU version of strerror_r but uses BSD/XSI one (#1911)
* harness: correct include and sort

warning redirecting incorrect #include <sys/errno.h> to <errno.h>

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-03-18 16:37:21 +01:00
Sven van Haastregt
4c318a1617 [CI] Upgrade to actions/checkout@v4 (#1920)
Node.js 16 actions are deprecated, so update to v4 which uses Node 20.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-03-18 10:38:35 +01:00
Sven van Haastregt
d8ad10d1ea device_execution: fix CL_QUEUE_* in error messages (#1896)
When reporting errors from `clCreateCommandQueueWithProperties`,
report the correct property names.  In particular:

`CL_QUEUE_DEVICE` should be `CL_QUEUE_ON_DEVICE`.
`CL_QUEUE_DEFAULT` should be `CL_QUEUE_ON_DEVICE_DEFAULT`.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-03-12 09:36:02 -07:00
Marcin Hajder
ffb0265abd Added command buffer test with all mutable parameters dispatch (#1905)
* Added command buffer with full mutable dispatch test

According to #1481 issue description, point 2.1

* Corrected the test to handle all available mutable properties

According to #1481 issue description, point 2.1
2024-03-12 09:33:57 -07:00
niranjanjoshi121
6530ae45b5 Add NULL CL_MEM_HOST_PTR check for all flag combinations (#1850)
* Add NULL CL_MEM_HOST_PTR check for clGetMemObjectInfo

The spec requires implementations return NULL for CL_MEM_HOST_PTR
when the flags passed at memory object creation time do not contain
CL_MEM_USE_HOST_PTR

CTS was not checking this. Add the same check.

Fixes #1752

* Add NULL CL_MEM_HOST_PTR check for all flag combinations

As part of suggestions to #1801, add NULL CL_MEM_HOST_PTR
check for all flag combinations.

Fixes #1752

* Fix formatting issues
2024-03-12 09:31:46 -07:00
BZZiv
90cefbb38e Bug fix in test_async_copy_fence - wrong events usage (#1736) 2024-03-12 09:25:22 -07:00