In the fp32 divide test, the range clamps are needed for the "fast
relaxed math" testing, but there is no "fast relaxed math" testing
for fp16. This means that the range clamps are unnecessary and can
be removed.
* allocations: Move results array from stack to heap (#1857)
* allocations: Fix stack overflow
* check format fixes
* Fix windows stack overflow. (#1839)
* thread_dimensions: Avoid combinations of very small LWS and very large GWS (#1856)
Modify the existing condition to include extremely small LWS like
1x1 on large GWS values
* c11_atomics: Reduce the loopcounter for sequential consistency tests (#1853)
Reduce the loop from 1000000 to 500000 since the former value
makes the test run too long and cause system issues on certain
platforms
* Limit individual allocation size using the global memory size (#1835)
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
* geometrics: fix Wsign-compare warnings (#1855)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* integer_ops: fix -Wformat warnings (#1860)
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>
* Replace OBSOLETE_FORAMT with OBSOLETE_FORMAT (#1776)
* 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
* Enhancement: Thread dimensions user parameters (#1384)
* 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.
* [NFC] conversions: reenable Wunused-but-set-variable (#1845)
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 bug of conversion from long to double (#1847)
* Fix bug of conversion from long to double
It the input is long type, it should be load as long type, not ulong.
* update long2float
* math_brute_force: fix exp/exp2 rlx ULP calculation (#1848)
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>
* Enable LARGEADDRESSAWARE for 32 bit compilation (#1858)
* Enable LARGEADDRESSAWARE for 32 bit compilation
32-bit executables built with MSVC linker have only 2GB virtual memory
address space by default, which might not be sufficient for some tests.
Enable LARGEADDRESSAWARE linker flag for 32-bit targets to allow tests
to handle addresses larger than 2 gigabytes.
https://learn.microsoft.com/en-us/cpp/build/reference/largeaddressaware-handle-large-addresses?view=msvc-170
Signed-off-by: Guo, Yilong <yilong.guo@intel.com>
* Apply suggestion
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
---------
Signed-off-by: Guo, Yilong <yilong.guo@intel.com>
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
* fix return code when readwrite image is not supported (#1873)
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 macos builds by avoiding double compilation of function_list.cpp for test_spir (#1866)
* 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
* fix the license header on the spirv-new tests (#1865)
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.
* compiler: fix grammar in error message (#1877)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Updated semaphore tests to use clSemaphoreReImportSyncFdKHR. (#1854)
* 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.
* subgroups: fix for testing too large WG sizes (#1620)
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.
* add SPIR-V version testing (#1861)
* 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
* fix the reported platform information for math brute force (#1884)
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.
* api tests fix: Use MTdataHolder in test_get_image_info (#1871)
* Minor fixes in mutable dispatch tests. (#1829)
* 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>
* add test for cl_khr_spirv_linkonce_odr (#1226)
* 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
* [NFC] subgroups: remove unnecessary extern keywords (#1892)
In C and C++ all functions have external linkage by default.
Also remove the unused `gMTdata` and `test_pipe_functions`
declarations.
Fixes https://github.com/KhronosGroup/OpenCL-CTS/issues/1137
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Added cl_khr_fp16 extension support for test_decorate from spirv_new (#1770)
* 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>
* add support for custom devices (#1891)
enable the CTS to run on custom devices
---------
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Guo, Yilong <yilong.guo@intel.com>
Signed-off-by: John Kesapides <john.kesapides@arm.com>
Co-authored-by: Sreelakshmi Haridas Maruthur <sharidas@quicinc.com>
Co-authored-by: Haonan Yang <haonan.yang@intel.com>
Co-authored-by: Ahmed Hesham <117350656+ahesham-arm@users.noreply.github.com>
Co-authored-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Co-authored-by: niranjanjoshi121 <43807392+niranjanjoshi121@users.noreply.github.com>
Co-authored-by: Grzegorz Wawiorko <grzegorz.wawiorko@intel.com>
Co-authored-by: Wenwan Xing <wenwan.xing@intel.com>
Co-authored-by: Yilong Guo <yilong.guo@intel.com>
Co-authored-by: Romaric Jodin <89833130+rjodinchr@users.noreply.github.com>
Co-authored-by: joshqti <127994991+joshqti@users.noreply.github.com>
Co-authored-by: Pekka Jääskeläinen <pekka.jaaskelainen@tuni.fi>
Co-authored-by: imilenkovic00 <155085410+imilenkovic00@users.noreply.github.com>
Co-authored-by: John Kesapides <46718829+JohnKesapidesARM@users.noreply.github.com>
Co-authored-by: Marcin Hajder <marcin.hajder@gmail.com>
Co-authored-by: Aharon Abramson <aharon.abramson@mobileye.com>
Half-precision functions are generally tested against the
single-precision reference. This causes double rounding: first to single
precision, then from there to half precision. For the most part, it is
good enough, but specifically in the case of fma, a correctly rounded
result is required and is not obtained, for instance for arguments
0x1.eacp+7, 0x1.3f4p+4, 0x1.c04p+14, which produce an exact result of
0x1.065fffp+15 which should be rounded to half-prefcision 0x1.064p+15,
but was previously first rounded to single-precision 0x1.066p+15, and
from there to half-precision 0x1.068p+15. Testing against reference_fmal
gives us sufficient precision that double rounding does not cause
issues.
The f_fma(..., FLUSHED) calls for FTZ testing cannot be updated the same
way but do not need to be: these calls all have at least one constant
operand of zero. If one operand is zero, double rounding cannot be an
issue.
* Enable fp16 in math bruteforce
* Added modernization of remaining half tests for consistency (issue #142, bruteforce)
* Added kernel types related corrections
* Added more fixes and general cleanup
* Corrected ULP values for half tests (issue #142, bruteforce)
* Corrected presubmit check for clang format
* Added support for ternary, unary_two_result and unary_two_result_i tests for cl_half (issue #142, bruteforce)
* Added missing condition due to vendor's review
* code format correction
* Added check for lack of support for denormals in binary_half scenario
* Corrected procedure to compute nextafter cl_half for flush-to-zero mode
* Added correction for external check of reference value for nextafter test
* Added correction due to code review request
* Changed quantity of tests performed for half in unary and macro_unary procedures from basic
* Added corrections related to code review:
-added binary_operator_half.cpp and binary_two_results_i_half.cpp
-address sanitizer errors fixed
-extending list of special half values
-removed unnecessary relaxed math references in half tests
-corrected conditions to verify ulp narrowing of computation results
-several refactoring and cosmetics corrections
* Print format correction due to failed CI check
* Corrected bug found in code review (fp16 bruteforce)
* Corrections related to code review (cl_khr_fp16 support according to #142)
-gHostFill missing support added
-special half values array extended
-cosmetics and unifying
* clang format applied
* consistency correction
* more consistency corrections for cl_fp16_khr supported tests
* Corrections related to code review (bureforce #142)
* Correction for i_unary_half test capacity
* Corrections related to capacity of cl_khr_fp16 tests in bruteforce (#142)
---------
Co-authored-by: Wawiorko, Grzegorz <grzegorz.wawiorko@intel.com>
* Added unification of existing conversions test as preparation for cl_khr_fp16 adaptation
* Unified initialization procedures for conversions test.
* Completed unification of data structures to handle cl_khr_fp16
* Added support for selective launch of the test
* Added half support for test_conversions, work in progres (issue #142, conversions)
* Added more work on halfs support for conversions test (issue #142, conversions)
* Added cosmetic corrections
* Added more cosmetic corrections before opening draft PR
* Added corrections related to pre-submit windows build
* Added more pre-build related corrections
* Added pre-submit ubuntu build related correction
* Added more pre-submit related corrections
* Divided structures into separate source files (issue #142, conversions)
* Added more corrections related to presubmit check
* Removed redeclarations due to presubmit check
* Added more corrections related to presubmit check arm build
* Added cosmetic correction
* Adapted modifications from related PR #1719 to avoid merging conflicts
* fixed clang format
* Added corrections related to code review (cl_khr_fp16 suuport according to issue #142)
* Corrections related to macos CI check fail
* fix for unclear clang format discrepancy
* More corrections related to code review (cl_khr_fp16 for conversions #142)
---------
Co-authored-by: Ewan Crawford <ewan@codeplay.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
* Fix enqueue_flags test to use correct barrier type.
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
* Add check for support for Read-Wrie images
Read-Write images have required OpenCL 2.x.
Read-Write image tests are already being skipped
for 1.x devices.
With OpenCL 3.0, read-write images being optional,
the tests should be run or skipped
depending on the implementation support.
Add a check to decide if Read-Write images are
supported or required to be supported depending
on OpenCL version and decide if the tests should
be run on skipped.
Fixes issue #894
* Fix formatting in case of Read-Write image checks.
Fix formatting in case of Read-write image checks.
Also, combine two ifs into one in case of
kerne_read_write tests
* Fix some more formatting for RW-image checks
Remove unnecessary spaces at various places.
Also, fix lengthy lines.
* Fix malloc-size calculation in test imagedim
unsigned char size is silently assumed to be 1
in imagedim test of test_basic.
Pass sizeof(type) in malloc size calculation.
Also, change loop variable from signed to unsigned.
Add checks for null pointer for malloced memory.
* Initial CTS for external sharing extensions
Initial set of tests for below extensions
with Vulkan as producer
1. cl_khr_external_memory
2. cl_khr_external_memory_win32
3. cl_khr_external_memory_opaque_fd
4. cl_khr_external_semaphore
5. cl_khr_external_semaphore_win32
6. cl_khr_external_semaphore_opaque_fd
* Updates to external sharing CTS
Updates to external sharing CTS
1. Fix some build issues to remove unnecessary, non-existent files
2. Add new tests for platform and device queries.
3. Some added checks for VK Support.
* Update CTS build script for Vulkan Headers
Update CTS build to clone Vulkan Headers
repo and pass it to CTS build
in preparation for external memory
and semaphore tests
* Fix Vulkan header path
Fix Vulkan header include path.
* Add Vulkan loader dependency
Vulkan loader is required to build
test_vulkan of OpenCL-CTS.
Clone and build Vulkan loader as prerequisite
to OpenCL-CTS.
* Fix Vulkan loader path in test_vulkan
Remove arch/os suffix in Vulkan loader path
to match vulkan loader repo build.
* Fix warnings around getHandle API.
Return type of getHandle is defined
differently based on win or linux builds.
Use appropriate guards when using API
at other places.
While at it remove duplicate definition
of ARRAY_SIZE.
* Use ARRAY_SIZE in harness.
Use already defined ARRAY_SIZE macro
from test_harness.
* Fix build issues for test_vulkan
Fix build issues for test_vulkan
1. Add cl_ext.h in common files
2. Replace cl_mem_properties_khr with cl_mem_properties
3. Replace cl_external_mem_handle_type_khr with
cl_external_memory_handle_type_khr
4. Type-cast malloc as required.
* Fix code formatting.
Fix code formatting to
get CTS CI builds clean.
* Fix formatting fixes part-2
Another set of formatting fixes.
* Fix code formatting part-3
Some more code formatting fixes.
* Fix code formatting issues part-4
More code formatting fixes.
* Formatting fixes part-5
Some more formatting fixes
* Fix formatting part-6
More formatting fixes continued.
* Code formatting fixes part-7
Code formatting fixes for image
* Code formatting fixes part-8
Fixes for platform and device query tests.
* Code formatting fixes part-9
More formatting fixes for vulkan_wrapper
* Code formatting fixes part-10
More fixes to wrapper header
* Code formatting fixes part-11
Formatting fixes for api_list
* Code formatting fixes part-12
Formatting fixes for api_list_map.
* Code formatting changes part-13
Code formatting changes for utility.
* Code formatting fixes part-15
Formatting fixes for wrapper.
* Misc Code formatting fixes
Some more misc code formatting fixes.
* Fix build breaks due to code formatting
Fix build issues arised with recent
code formatting issues.
* Fix presubmit script after merge
Fix presubmit script after merge conflicts.
* Fix Vulkan loader build in presubmit script.
Use cmake ninja and appropriate toolchain
for Vulkan loader dependency to fix
linking issue on arm/aarch64.
* Use static array sizes
Use static array sizes to fix
windows builds.
* Some left-out formatting fixes.
Fix remaining formatting issues.
* Fix harness header path
Fix harness header path
While at it, remove Misc and test pragma.
* Add/Fix license information
Add Khronos License info for test_vulkan.
Replace Apple license with Khronos
as applicable.
* Fix headers for Mac OSX builds.
Use appropriate headers for
Mac OSX builds
* Fix Mac OSX builds.
Use appropriate headers for
Mac OSX builds.
Also, fix some build issues
due to type-casting.
* Fix new code formatting issues
Fix new code formatting issues
with recent MacOS fixes.
* Add back missing case statement
Add back missing case statement
that was accidentally removed.
* Disable USE_GAS for Vulkan Loader build.
Disable USE_GAS for Vulkan Loader build
to fix aarch64 build.
* Fixes to OpenCL external sharing tests
Fix clReleaseSemaphore() API.
Fix copyright year.
Some other minor fixes.
* Improvements to OpenCL external sharing CTS
Use SPIR-V shaders instead of NV extension path
from GLSL to Vulkan shaders.
Fixes for lower end GPUs to use limited memory.
Update copy-right year at some more places.
* Fix new code formatting issues.
Fix code formatting issues with
recent changes for external sharing
tests.
* More formatting fixes.
More formatting fixes for recent
updates to external sharing tests.
* Final code formatting fixes.
Minor formatting fixes to get
format checks clean.
* Update extension list of test_compiler
Upate extension list of test_compiler
with missing external memory and semaphore
extensions
* Add ffp-contract=off Compilation flag for CTS build.
GCC defaults to using ffp-contract=fast even when fast math is disabled in the
case of GNU C
This creates precision issues when comparing the results with that of x86_64.
GNU options reference:
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#
This fix is to disable floating-point expression contractions with
flag ffp-contract=off for math_brute_force tests
Fixes#1794
* Make fp-contract flag arch-independent, but compiler dependent
Use existing CMake constructs to add fp-contract flag
so that it automatically checks for compiler support.
Also, make this change arch-independent.
Fixes#1794
* Fix typo in earlier commit
Fix typo in earlier commit
Fixes#1794
* Remove duplicate addition of ffp-contract flag
ffp-contract flag is currently added via two macros
Retain add_cxx_flag_if_supported macro and remove
set_gnulike_module_compile_flags.
Fixes#1794
* Fix typo in earlier commit
Add closing " that was unintentionally removed in previous commit.
* Update test_compile.cpp
Prevent the error:
"variable 'temp' is uninitialized when used here"
Since one of the generated kernels starts with:
__kernel void sample_test(__global float *src, __global int *dst)
{
float temp;
int tid = get_global_id(0);
dst[tid] = dst[tid] + temp;
* Update test_compile.cpp
clang format
* Update test_compile.cpp
Change the "0.0" literal to "0.0f" for devices that don't support FP64.
The suite's `main()` function already disables the FTZ mode prior to
invoking `runTestHarnessWithCheck` and restores the FP state
afterwards, so tests don't have to do so themselves.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
OpenCL FULL profile requires that online compiler be available.
OpenCL-CTS currently queries profile as well as online compiler
availability via device queries, but doesn't check for the consistency.
Check for consistency that if CL_DEVICE_PROFILE is "FULL_PROFILE"
(or technically is not "EMBEDDED_PROFILE") then CL_DEVICE_COMPILER_AVAILABLE
is CL_TRUE for that device.
Fixes#1763
The verification uses a common function with nested loops to verify
the result of the copy operation. The upper loop limits thirdDim and
SecondDim should be set according to the image type under test. Previously
for 1D/2D they were set from dstImageInfo->depth and dstImageInfo->height.
The issue is that the depth and height are set to 0 when unused. This
caused the verification loop to be skipped.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
test_conformance/api/test_queue_properties.cpp uses a cl_queue_properties_khr value
to query CL_DEVICE_QUEUE_PROPERTIES, however this should be a cl_command_queue_properties
typed variable.
Fixes issue #1640
* rewrite test_select to run in a few seconds.
* removing the threading; reverting to the original method.
* Merge from Master, remove all suggested changes and start with a simple change report on each change's cost savings:
BEFORE:
real 47m8.497s
user 48m8.860s
sys 0m14.952s
AFTER:
real 17m53.383s
user 18m53.342s
sys 0m13.297s
initSrcBuffer generates the same random noise every iteration through the loop. There is no change to the arguments, and the host data itself doesn't need to get rewritten. Profiling realizes a 2 times speed accel from simply relying upon the buffer to remain randomized at the next loop iteration.
* BEFORE:
real 17m53.383s
user 18m53.342s
sys 0m13.297s
AFTER:
real 12m26.035s
user 13m15.505s
sys 0m15.414s
rearrange a few things in the loops to allow for vectorized / interleaved loop traversal. NB: not all loops are vectorizable obviously; but this addresses the worst offenders. Also note, to enable compiler to generate vectorized and interleaved loop traversal build with -o3.
* address the CI format requirements.
* address the CI format requirements.
* address the CI format requirements.
Bail out when hitting the default case, so that we don't attempt to
access the uninitialized `error` variable.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Printing of a `size_t` requires the `%z` specifier.
* Printing of `cl_long`/`cl_ulong` 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>
Only disable `-Wsign-compare` for tests that do not compile cleanly
with this warning enabled. Re-enable the warning for the other tests,
so that it can catch any new occurrences.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The `CHECK_GL_ERROR` macro was lowercase before, which confused
clang-format and resulted in some odd indentations. Capitalize the
macro and run clang-format to fix the indentation.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
In preparation of re-enabling -Wformat globally, fix format string
warnings in test_common.
Printing a `size_t` requires the `%zu` specifier.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Simplify code by returning directly instead of using goto statements.
Although intended as an NFC commit, this changes the behaviour when
verification fails: the output buffer is no longer unmapped. Although
not ideal, this aligns the behaviour of `macro_unary_float` to the
other math_brute_force tests.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Fix for Command buffer wait_for_sec_queue_event subtest, call clFinish in the correct order.
queue has a command that depends on a command that resides in queue_sec, calling clFinish(queue) before clFinish(queue_sec) causes the test to hang as the queue_sec command never got a chance to finish.
* Update PR change as per the suggestion.
* Vulkan: Fix descriptor sets
Use descriptor set arrays when programming
arrays for compute shader.
Change-Id: Idabab775a256a223660eb7a850e26f290453659e
* Vulkan: Fix queue propertyies
Transfer bit for queue family is not required
to be reported by the implementation, it is
implicit for compute.
Change-Id: I7424b00e25e35145433dd74b0b4dfe7eeeaf98c8
* Vulkan: Allow implementation to choose dedicated memory
Dedicated vs non-dedicated memory must be queried by
the app. Implementations are not required to support
exportable non-dedicated memory.
Change-Id: Idbc46ace1be20f61d1b58b34756f6d79a7745911
* Fix formatting
Auto-generated formatting fix
* Fix bug in dedicated memory.
* Add check for if OpenCL assumes linear tiling
Change-Id: Idd2e24d9d69e1fbc3ccb4a279067533104185332
* Changed macro name to reflect spec
CL_DEVICE_EXTERNAL_MEMORY_IMPORT_ASSUME_LINEAR_HANDLE_TYPES_KHR to
CL_DEVICE_EXTERNAL_MEMORY_IMPORT_ASSUME_LINEAR_IMAGES_HANDLE_TYPES_KHR
Also changed some functions to not use the KHR variants.
---------
Co-authored-by: Joshua Kelly <joshkell@qti.qualcomm.com>
Some new extension formats require the width to be a multiple
of 4 or 2 (see cl_ext_image_raw10_raw12).
Change has not functional impact as the affected image is only used
for generic queries.
Signed-off-by: John Kesapides <john.kesapides@arm.com>
This patch adds two test cases related to command-buffer finalization:
1) That it is an error to finalize and already finalized command-buffer.
See https://github.com/KhronosGroup/OpenCL-Docs/pull/817
2) That it is not an error to create, finalize, and execute an empty
command-buffer. Closes issue #1781
The subgroup and workgroup sizes reported by clGetKernelSubGroupInfo
and clGetKernelWorkGroupInfo are of type `size_t`. Avoid changing the
values to an `int` type as they are propagated through the tests and
then compared against `size_t` again.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Before this change, `add_index_bin_test` would not release `cl_mem`
resources or `malloc`ed memory when encountering an error. Fix by
using `clMemWrapper` and `std::unique_ptr` to automatically release
resources.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* ci: use ubuntu-22.04 instead of 20.04
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
* bump clang-format version
Oldest supported by 22.04
* update check-format script
---------
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
The initialisation code is clearly meant to be run once but the volatile
flag did not guarantee that at all:
- Volatile does not mean atomic and loading the flag vs. other writes
was not safe.
- Multiple threads could have loaded 0 and performed the initialisation
resulting in write collisions.
Rely on std::call_once to provide the guarantee.
This issue was flagged by TSAN.
Signed-off-by: Kévin Petit <kpet@free.fr>