* [subgroups][non_uniform_broadcast] Fix broadcasting index generation
The subgroup size may not be greater than `NR_OF_ACTIVE_WORK_ITEMS`.
Broadcasting index needs to be reduced in that case.
Otherwise, if subgroup size == `NR_OF_ACTIVE_WORK_ITEMS` == 4, then we
will encounter "divide-by-zero" error when evaluating `bcast_index %
(n - NR_OF_ACTIVE_WORK_ITEMS)`.
* Revert "[subgroups][non_uniform_broadcast] Fix broadcasting index generation"
This reverts commit 9bbab539de.
* [subgroups][non_uniform_broadcast] Fix broadcasting index generation
Dynamically activate half of the work items in the current subgroup
instead of hardcoding as `NR_OF_ACTIVE_WORK_ITEMS`.
* Apply suggestion
Using `GLOB` here breaks incremental builds when switching between
branches (e.g. when trying out a pull request). The CMake
documentation discourages use of `GLOB` to collect a list of source
files, so list all source files explicitly.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Use the `z` length modifier for printing `size_t` types.
Also fix a typo in the error messages.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
CL_DEVICE_MAX_WORK_GROUP_SIZE is specified to fill in a size_t. By
asking it to fill in an uninitialised cl_long, on platforms where size_t
is smaller than cl_long, the high bits of the cl_long remain
uninitialised.
All of these warnings stem from printing `size_t` types, which should
be done using the `z` length modifier.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Added cl_khr_fp16 extension support for test_decorate from spirv_new, work in progres
* Complemented test_decorate saturation test to support cl_khr_fp16 extension (issue #142)
* Fixed clang format
* scope of modifications:
-changed naming convention of saturation .spvasm files related to
test_decorate of spirv_new
-restored float to char/uchar saturation tests
-few minor corrections
* fix ranges for half testing
* fix formating
* one more formatting fix
* remove unused function
* use isnan instead of std::isnan
isnan is currently implemented as a macro, not as a function, so
we can't use std::isnan.
* fix Clang warning about inexact conversion
---------
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
* initial version of the test with placeholders for linkonce_odr linkage
* add OpExtension SPV_KHR_linkonce_odr extension
* add check for extension
* switch to actual LinkOnceODR linkage
* fix formatting
* add a test case to ensure a function with linkonce_odr is exported
* add back the extension check
* fix formatting
* undo compiler optimization and actually add the call to function a
* Minor fixes in mutable dispatch tests.
* Fix size of newWrapper in MutableDispatchSVMArguments.
* Fix errnoneus clCommandNDRangeKernelKHR call.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
* * Set the row_pitch for imageInfo in MutableDispatchImage1DArguments
and MutableDispatchImage2DArguments. The row_pitch is
used by get_image_size() to calculate the size of
the host pointers by generate_random_image_data.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
---------
Signed-off-by: John Kesapides <john.kesapides@arm.com>
When the math brute force test printed the platform version it always
printed information for the first platform in the system, which could
be different than the platform for the passed-in device. Fixed by
querying the platform from the passed-in device instead.
* basic SPIR-V 1.3 testing support
* updated script to compile for more SPIR-V versions
* switch to general SPIR-V versions test
* update copyright text and fix license
* improve output while test is running
* check for higher SPIR-V versions first
* fix formatting
It seemed to be a typo; the comment says that it
tries to fetch local size for a subgroup count with
above max WG size, but it just used the previous
subgroup count.
The test on purpose sets a SG count to be a larger
number than the max work-items in the work group.
Given the minimum SG size is 1 WI, it means that there
can be a maximum of maximum work-group size of SGs (of
1 WI of size). Thus, if we request a number of SGs that
exceeds the local size, the query should fail as expected.
* Updated semaphore tests to use clSemaphoreReImportSyncFdKHR.
Additionally updated common semaphore code to handle spec updates
that restrict simultaneous importing/exporting of handles.
* Fix build issues on CI
* gcc build issues
* Make clReImportSemaphoreSyncFdKHR a required API
call if cl_khr_external_semaphore_sync_fd is present.
* Implement signal and wait for all semaphore types.
The source files for the spirv-new tests were using the older Khronos
license instead of the proper Apache license. Fixed the license in
all source files.
* modernize CMakeLists for test_spir
* add the operating system release to the sccache key
* include the math brute force function list vs. building it twice
This function (do_test) starts by testing write and read individually.
Both of them can have errors.
When readwrite image is not supported, the function returns
TEST_SKIPPED_ITSELF potentially masking errors leading to the test
returning EXIT_SUCCESS even with errors along the way.
Fix the ULP error calculation for the `exp` and `exp2` builtins in
relaxed math mode for the full profile.
Previously, the `ulps` value kept being added to while verifying the
result buffer in a loop. `ulps` could even become a `NaN` when the
input argument being tested was a `NaN`.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Remove an assigned-to but unused variable.
Reenable the Wunused-but-set-variable warning for the conversions
suite, as it now compiles cleanly with this warning enabled.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Fix format in the test scope
* Add user params to limit testing
Add parameters to reduce amount of testing.
Helpful for debugging or for machines with lower performance.
* Restore default value
* Print info only if testing params bigger than 0.
* Replace OBSOLETE_FORAMT with OBSOLETE_FORMAT
In imageHelpers.cpp and few other places in image tests, OBSOLETE_FORMAT is misspelled as OBSOLETE_FORAMT.
Fix misspelling by replcaing it with OBSOLETE_FORMAT.
Fixes#1769
* Remove code guarded by OBSOLETE_FORMAT
Remove code guarded by OBSOLETE_FORMAT
as suggested by review comments
Fixes#1769
* Fix formating issues for OBSOLETE_FORMAT changes
Fix formatting issues observed in files while removing
code guarded by OBSOLETE_FORMAT
Fixes#1769
* Some more formatting fixes
Some more formatting fixes to get CI clean
Fixes#1769
* Final Formating fixes
Final formatting fixes for #1769
The main sources of warnings were:
* Printing of a `size_t` which requires the `%zu` specifier.
* Printing of `cl_long`/`cl_ulong` which is now done using the
`PRI*64` macros to ensure portability across 32 and 64-bit builds.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Increase the number of work items used by the allocations test
The test uses a fixed number of work items to process very large
buffers and images. As devices support more and more memory, this
leads to an ever-increasing amount of work done in each work item.
This results in some implementations and devices hitting timeout
issues.
Furthermore, a greater number of work items can provide performance
benefits on some devices.
Long term, this test should be redesigned to scale the number
of threads dynamically as a function of the max allocation size.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* formatting and add parentheses
---------
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* Added support for SYNC_FD and other handle types
* Fix consistency test
Deleted test cases that are no longer testable
according to the spec.
* Fix multi-import tests
-Delete obsolete code relating to offsets
-Propagate dedicated memory change
* Fix error handling
Some subtests did not fail on incorrect result.
Changes to macros to fail, so this does not occur
again.
* Delete invalid test cases
Test cases are not related to this extension.
* External memory test
Add support for any handle type supported by
the platform.
Change-Id: I6765fde5e7929988f49bfbf2df2f41d5263b6abc
* Update multi-import tests to use new semaphore types
* Fix formatting
* Addressed review comments. Deleted VULKAN_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_NT_KMT as it appears to be redundant.
Using `local_size_x = 512` in the shader used in the Vulkan interop
tests fails on older hardware because this exceeds the maximum barrier
size limit.
Changed to 256, which is still a multiple of 32 and 64,
and is below the hardware limitations. The tests are not performance
tests anyways, so the performance penalty, if any, is acceptable.
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Some `HOST_` types were declared with signedness different from the
`HOST_ATOMIC_` counterparts, leading to sign-compare warnings when
comparing between types. Fix by aligning the signedness.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Initialize the `_memoryOrder` and `_memoryScope` members to avoid
`CBasicTestMemOrderScope::MaxHostThreads()` accessing uninitialized
data.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Only check against 2D image types as per the spec.
Move some device checks out of the loop.
Only perform the checks when element_size is a power of two.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
* Added cl_khr_fp16 support for test_explicit_s2v from basic (issue #142, basic)
* Cosmetic corrections
* cosmetic fix
* Added correction to distinguish signed and unsigned char types for ARM architecture tests
* Added missing pieces of convertion procedure to support half
* Corrected condition to verify if additional pragma is necessary (issue #142, basic)
* Add NaN check for half to float conversion
* check-format fixes
* Add NaN check for all float types
Use std::isnan for float/double types.
Change-Id: I005bddccaa3f8490ac59b2aa431ed315733ad143
* Fix Ubuntu build error with isnan macro definition
Change-Id: I671ed826a9631fbbc66d0aa9b674ab00124c7967
* Check format fixes
* NAN define not needed anymore
---------
Co-authored-by: Vasu Penugonda <vpenugon@qti.qualcomm.com>
Co-authored-by: Sreelakshmi Haridas <sharidas@quicinc.com>
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