-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Travis badge to README #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
yanfeng3721
added a commit
to yanfeng3721/OpenCL-CTS
that referenced
this pull request
Apr 20, 2022
* Use macOS 10 in CI (KhronosGroup#1282) macOS jobs frequently fail. Since macos-11.0 support is considered experimental, move to macos-10, using macos-latest so we automatically move to 11 when stable. See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners Signed-off-by: Kevin Petit <kevin.petit@arm.com> * Fix double-release of memory objects (KhronosGroup#1277) A recent update to the object wrapper classes (KhronosGroup#1268) changed the behavior of assigning to a wrapper, whereby the wrapped object is now released upon assignment. A couple of tests were manually calling clReleaseMemObject and then assigning `nullptr` to the wrapper, resulting in the wrapper calling clReleaseMemObject on an object that had already been destroyed. * Fix check for image support in test_basic sizeof (KhronosGroup#1269) * add basic test for cl_khr_pci_bus_info (KhronosGroup#1227) * add basic test for cl_khr_pci_bus_info * correctly use TEST_SKIPPED_ITSELF Co-authored-by: Kévin Petit <kpet@free.fr> * fix related usage of TEST_SKIPPED_ITSELF Co-authored-by: Kévin Petit <kpet@free.fr> * Fix double release of object in test_api and test_gl (KhronosGroup#1287) * Fix clang format only * Fix double release of objects * subgroups: Fix setting cl_halfs and progress check. (KhronosGroup#1278) * subgroups: Fix setting cl_halfs and progress check. cl_float testing uses set_value such that a generated cl_ulong of 1 is stored as 1.0F in a logical sense. However, cl_half values aren't intrinsic to C++ and generated cl_ulongs less than 1024 in particular are interpreted bitwise as subnormals. The test fails on compute devices lacking subnormal support. Perform the logical conversion to cl_half. Fix independent forward progress check. * subgroups_half: Address review comments * subgroups_half: Formatting fixes required by check-format * subgroups_half: Modified to query and use rounding mode supported by device Co-authored-by: spauls <spauls@qti.qualcomm.com> * Add tests for entrypoint cl_khr_suggested_local_work_size (KhronosGroup#1264) * Add tests for entrypoint cl_khr_suggested_local_work_size Tests added within test_conformance/workgroups. The tests cover several shapes (num dimensions) and sizes of global work size, kernels using local memory (dynamic and static) and present/non-present global work offset. Signed-off-by: Kallia Chronaki <kallia.chronaki@arm.com> * Fix in comparison for error checking Signed-off-by: Kallia Chronaki <kallia.chronaki@arm.com> * 'test_wg_suggested_local_work_size' fixes * Refactoring of 'test_wg_suggested_local_work_size' Modifications to reduce code duplication and minimize build time * remove testing for scalar vloada_half (KhronosGroup#1293) * Temporarily disable the test_kernel_attributes test case (KhronosGroup#1297) * Temporarily disable the test_kernel_attributes test case Per OpenCL spec on CL_KERNEL_ATTRIBUTES, for kernels not created from OpenCL C source and the clCreateProgramWithSource API call the string returned from this query will be empty. But in test_kernel_attributes test, it read from bc binary and expect to get kernel attribute, which is not consistent with OpenCL spec. * Fix clang format issue * Fix double free in c11_atomics tests for SVM allocations (KhronosGroup#1286) * Only Clang format changes * Fix double free object for SVM allocations * Fix double free - review fixes * Fix kernel source for cl_khr_suggested_local_work_size (KhronosGroup#1300) Use ASCII '-' instead of unicode '–' as subtration operator. Signed-off-by: Kévin Petit <kpet@free.fr> * Remove unused definitions in CMakeLists.txt (KhronosGroup#1302) Signed-off-by: Kévin Petit <kpet@free.fr> * add tests for cl_khr_integer_dot_product (KhronosGroup#1276) * cl_khr_integer_dot_product_tests * remove emulated codepaths * fix formatting * address code review comments * remove emulated codepaths again * address one more review comment * define NOMINMAX in the CMakefile to fix std::min and std::max on MSVC (KhronosGroup#1308) * Report failures in simple_{read,write}_image_pitch tests (KhronosGroup#1309) * Add cl_khr_integer_dot_product to known extensions in test compiler. (KhronosGroup#1316) * suppress MSVC strdup warning (KhronosGroup#1314) * Add missing include for gRandomSeed (KhronosGroup#1307) * Limit workgroup size for atomics tests (KhronosGroup#1197) * Limit workgroup size for atomics tests This avoids extremely large local buffer size and slow run * Always limit workgroup size * Fix memory model issue in `atomic_flag`. (KhronosGroup#1283) * Fix memory model issue in atomic_flag. In atomic_flag sub-tests that modify local memory, compilers may re-order memory accesses between the local and global address spaces which can lead to incorrect test failures. This commit ensures that both local and global memory operations are fenced to prevent this re-ordering from occurring. Fixes KhronosGroup#134. * Clang format changes. * Added missing global acquire which is necessary for the corresponding global release. Thanks to @jlewis-austin for spotting. * Clang format changes. * Match the condition for applying acquire/release fences. * remove min max macros (KhronosGroup#1310) * remove the MIN and MAX macros and use the std versions instead * fix formatting * fix Arm build * remove additional MIN and MAX macros from compat.h * gles: Fix double frees. (KhronosGroup#1323) * gles: Fix double frees. Remove a few explicit frees in the redirect_buffers test which are already handled by a wrapper. * gles: Fix double frees A recent update to the object wrapper classes (KhronosGroup#1268) changed the behavior of assigning to a wrapper, whereby the wrapped object is now released upon assignment. A couple of tests were manually calling clReleaseMemObject and then assigning `nullptr` to the wrapper, resulting in the wrapper calling clReleaseMemObject on an object that had already been destroyed. Co-authored-by: spauls <spauls@qti.qualcomm.com> * api: Enable cl_khr_fp16 when using half types in kernel (KhronosGroup#1327) * Update cl_khr_integer_dot_product tests for v2 (KhronosGroup#1317) * Update cl_khr_integer_dot_product tests for v2 Signed-off-by: Kevin Petit <kevin.petit@arm.com> Signed-off-by: Marco Cattani <marco.cattani@arm.com> Change-Id: I97dbd820f1f32f6b377e47d0bf638f36bb91930a * only query acceleration properties with v2+ Change-Id: I3f13a0cba7f1f686365b10adf81690e089cd3d74 * Report unsupported extended subgroup tests as skipped rather than passed (KhronosGroup#1301) * Report unsupported extended subgroup tests as skipped rather than passed Also don't check the presence of extensions for each sub-test. Signed-off-by: Kévin Petit <kpet@free.fr> * address review comments * Extended subgroups - use 128bit masks (KhronosGroup#1215) * Extended subgroups - use 128bit masks * Refactoring to avoid kernels code duplication * unification kernel names as test_ prefix +subgroups function name * use string literals that improve readability * use kernel templates that limit code duplication * WorkGroupParams allows define default kernel - kernel template for multiple functions * WorkGroupParams allows define kernel for specific one subgroup function Co-authored-by: Stuart Brady <stuart.brady@arm.com> * Remove space character from extension name (KhronosGroup#1336) * Add testing of sub_group_broadcast for (u)char and (u)short types (KhronosGroup#1347) Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Remove excessive logging in subgroup tests (KhronosGroup#1343) This also adds some missing data type logging to the subgroup_functions_non_uniform_vote tests. Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Improve error handling in subgroup tests (KhronosGroup#1352) * MPGCOMP-14761 Improve error handling in subgroup tests Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Add missing newline * Clean up logging in cl_khr_subgroup_ballot tests (KhronosGroup#1351) The tests were logging scalar results as vectors padded with zeroes for no apparent benefit. Fix this. Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Fix missing cl_khr_semaphore extensions in compiler tests (KhronosGroup#1357) * Added missing extensions related to cl_khr_semaphore Signed-off-by: Marco Cattani <marco.cattani@arm.com> * Fix stack-use-after-scope crash in conversions (KhronosGroup#1358) The way that program sources were being constructed involved capturing pointers to strings that were allocated on the stack, and then trying to use them outside of that scope. This change uses a stringstream defined in the outer scope to build the program instead. * Use maximum subgroup size in sub_group_ballot tests (KhronosGroup#1344) sub_group_ballot_bit_count() and sub_group_ballot_find_msb() mask their input according to a subgroup size, which is assumed to be the maximum subgroup size, and not the actual subgroup size excluding non-existent work-items in the "remainder" subgroup. Fix this as per the the clarification made to the OpenCL C specification in revision 3.0.9 for issue KhronosGroup/OpenCL-Docs#626 by pull request KhronosGroup/OpenCL-Docs#689. Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Fix conversion data loss in test_api min_max_constant_args (KhronosGroup#1355) * Subgroups tests - sub_group_non_uniform_scan_exclusive function fixes (KhronosGroup#1350) * Fix - comparing results will never happen. * No special action needed for one work item in the subgroup * Remove unused inclusion of <cstdio> (KhronosGroup#1362) Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Tidy up code to determine bit mask for ballot scans (KhronosGroup#1363) It seems more intuitive to set only the bits that are required, rather than to set one more bit than is required, only to clear it again. Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Test api min max - fix printing cl_ulong data type (KhronosGroup#1212) * test api - fix code formatting only * Fix printing cl_ulong type to avoid overloading. * Fix printing size_t data type * Fix printing size_t data type - set unsinged * Fix formatting for maxArgs (uint) and numberOfInts (size_t) * Fix build, glext should not be used with GLEW (KhronosGroup#1337) * Fix build, glext should not be used with GLEW * Remove additional define GL_GLEXT_PROTOTYPES * Remove includes which already defined in setup.h * Add cl_khr_command_buffer to list of extensions (KhronosGroup#1365) cl_khr_command_buffer is now public as a provisional khr extension which implementations may report. * Refactor logging of subgroup test start/pass messages (KhronosGroup#1361) Note that this also corrects the start messages logged for the sub_group_ballot_bit_count/find_msb/find_lsb tests. Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Remove dead threading code (KhronosGroup#1339) Remove unused code that hasn't been used for the last three years and isn't included in makefiles. Co-authored-by: oramirez <oramirez@qti.qualcomm.com> * test_subgroups - Set safe input values for half type and mul, add operations (KhronosGroup#1346) * Set safe input values for half type and mul, add operations * Set safe values for all data types * Typo fix * Set constant seed for shuffle * Change function name to more specific * set_value takes an integer value, not a bit pattern * Remove invalid negative_get_platform_info testcase (KhronosGroup#1374) * Remove invalid negative_get_platform_info testcase * Implementations are only required to do null checks * Fixes KhronosGroup#1318 * Fix formatting * Fix test_api get_command_queue_info (KhronosGroup#1324) * Fix test_api get_command_queue_info Decouple host and device out-of-order test enabling * Rename property sets more generically * Refactor to use std::vector to accumulate test permutations * Fix memory leaks (KhronosGroup#1378) * Fix memory leaks Fixed memory leaks in: buffers, basic, and vectors * Formatting fixes Co-authored-by: oramirez <oramirez@qti.qualcomm.com> Co-authored-by: Kévin Petit <kpet@free.fr> Co-authored-by: James Price <jrprice@google.com> Co-authored-by: BKoscielak <bartosz.koscielak@intel.com> Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com> Co-authored-by: Grzegorz Wawiorko <grzegorz.wawiorko@intel.com> Co-authored-by: Sreelakshmi Haridas Maruthur <sharidas@quicinc.com> Co-authored-by: spauls <spauls@qti.qualcomm.com> Co-authored-by: kalchr01 <83217667+kalchr01@users.noreply.github.com> Co-authored-by: Feng Zou <feng.zou@intel.com> Co-authored-by: Senran (Stephen) Zhang <senran.zhang@intel.com> Co-authored-by: Jeremy Kemp <jeremy@jeremykemp.co.uk> Co-authored-by: Stuart Brady <stuart.brady@arm.com> Co-authored-by: marcat03 <94451804+marcat03@users.noreply.github.com> Co-authored-by: Ewan Crawford <ewan@codeplay.com> Co-authored-by: oramirez <oramirez@qti.qualcomm.com> Co-authored-by: Jim Lewis <j.lewis1@samsung.com>
kbenzie
added a commit
to kbenzie/OpenCL-CTS
that referenced
this pull request
Oct 28, 2022
While testing an OpenCL driver with ThreadSanitizer enabled the OpenCL-CTS suffers from thread leaks in conversions and bruteforce on posix systems. This is because `pthread_join` is never called in `ThreadPool_Exit` for the `pthread_t`s created by the thread pool. Instead, the threads are only informed to stop waiting on the condition variable which unblocks the worker thread but does not clean up after itself. ``` ThreadPool: thread 1 exiting. ThreadPool: thread 5 exiting. ThreadPool: thread 4 exiting. ThreadPool: thread 2 exiting. ThreadPool: thread 7 exiting. ThreadPool: thread 0 exiting. ThreadPool: thread 3 exiting. ThreadPool: thread 6 exiting. Thread pool exited in a orderly fashion. ================== WARNING: ThreadSanitizer: thread leak (pid=2292842) Thread T9 (tid=2292855, finished) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) KhronosGroup#1 ThreadPool_Init() <null> (test_conversions+0x35b2c) KhronosGroup#2 pthread_once ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1449 (libtsan.so.0+0x4057c) KhronosGroup#3 GetThreadCount() <null> (test_conversions+0x36262) KhronosGroup#4 DoTest(_cl_device_id*, Type, Type, SaturationMode, RoundingMode, _MTdata*) [clone .isra.0] <null> (test_conversions+0x10555) KhronosGroup#5 test_conversions(_cl_device_id*, _cl_context*, _cl_command_queue*, int) <null> (test_conversions+0x13226) KhronosGroup#6 callSingleTestFunction(test_definition, _cl_device_id*, int, int, unsigned long) <null> (test_conversions+0x2e66d) KhronosGroup#7 parseAndCallCommandLineTests(int, char const**, _cl_device_id*, int, test_definition*, int, unsigned long, int) <null> (test_conversions+0x2fb3a) KhronosGroup#8 runTestHarnessWithCheck(int, char const**, int, test_definition*, int, unsigned long, test_status (*)(_cl_device_id*)) <null> (test_conversions+0x349d8) KhronosGroup#9 main <null> (test_conversions+0xd725) And 7 more similar thread leaks. SUMMARY: ThreadSanitizer: thread leak (OpenCL-CTS/buildbin/conversions/test_conversions+0x35b2c) in ThreadPool_Init() ``` This patch adds global state to keep track of the `pthread_t`s created by `pthread_create` in `ThreadPool_Init`. The list of `pthread_t`s is then used by `ThreadPool_Exit` to call `pthread_join` to cleanup the `pthread_t`s correctly. A near identical example, and additional explanation, can be found on [stackoverflow](https://stackoverflow.com/questions/72435574/thread-leak-detected-when-using-condition-variable-instead-of-join-with-pthrea). On the Windows path, a similar change is not necessary because `_beginthread` is used which automatically cleans up after itself when the worker thread function returns.
kbenzie
added a commit
to kbenzie/OpenCL-CTS
that referenced
this pull request
Nov 2, 2022
While testing an OpenCL driver with ThreadSanitizer enabled the OpenCL-CTS suffers from thread leaks in conversions and bruteforce on posix systems. This is because `pthread_join` is never called in `ThreadPool_Exit` for the `pthread_t`s created by the thread pool. Instead, the threads are only informed to stop waiting on the condition variable which unblocks the worker thread but does not clean up after itself. ``` ThreadPool: thread 1 exiting. ThreadPool: thread 5 exiting. ThreadPool: thread 4 exiting. ThreadPool: thread 2 exiting. ThreadPool: thread 7 exiting. ThreadPool: thread 0 exiting. ThreadPool: thread 3 exiting. ThreadPool: thread 6 exiting. Thread pool exited in a orderly fashion. ================== WARNING: ThreadSanitizer: thread leak (pid=2292842) Thread T9 (tid=2292855, finished) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) KhronosGroup#1 ThreadPool_Init() <null> (test_conversions+0x35b2c) KhronosGroup#2 pthread_once ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1449 (libtsan.so.0+0x4057c) KhronosGroup#3 GetThreadCount() <null> (test_conversions+0x36262) KhronosGroup#4 DoTest(_cl_device_id*, Type, Type, SaturationMode, RoundingMode, _MTdata*) [clone .isra.0] <null> (test_conversions+0x10555) KhronosGroup#5 test_conversions(_cl_device_id*, _cl_context*, _cl_command_queue*, int) <null> (test_conversions+0x13226) KhronosGroup#6 callSingleTestFunction(test_definition, _cl_device_id*, int, int, unsigned long) <null> (test_conversions+0x2e66d) KhronosGroup#7 parseAndCallCommandLineTests(int, char const**, _cl_device_id*, int, test_definition*, int, unsigned long, int) <null> (test_conversions+0x2fb3a) KhronosGroup#8 runTestHarnessWithCheck(int, char const**, int, test_definition*, int, unsigned long, test_status (*)(_cl_device_id*)) <null> (test_conversions+0x349d8) KhronosGroup#9 main <null> (test_conversions+0xd725) And 7 more similar thread leaks. SUMMARY: ThreadSanitizer: thread leak (OpenCL-CTS/buildbin/conversions/test_conversions+0x35b2c) in ThreadPool_Init() ``` This patch adds global state to keep track of the `pthread_t`s created by `pthread_create` in `ThreadPool_Init`. The list of `pthread_t`s is then used by `ThreadPool_Exit` to call `pthread_join` to cleanup the `pthread_t`s correctly. A near identical example, and additional explanation, can be found on [stackoverflow](https://stackoverflow.com/questions/72435574/thread-leak-detected-when-using-condition-variable-instead-of-join-with-pthrea). On the Windows path, a similar change is not necessary because `_beginthread` is used which automatically cleans up after itself when the worker thread function returns.
bashbaug
pushed a commit
that referenced
this pull request
Nov 8, 2022
While testing an OpenCL driver with ThreadSanitizer enabled the OpenCL-CTS suffers from thread leaks in conversions and bruteforce on posix systems. This is because `pthread_join` is never called in `ThreadPool_Exit` for the `pthread_t`s created by the thread pool. Instead, the threads are only informed to stop waiting on the condition variable which unblocks the worker thread but does not clean up after itself. ``` ThreadPool: thread 1 exiting. ThreadPool: thread 5 exiting. ThreadPool: thread 4 exiting. ThreadPool: thread 2 exiting. ThreadPool: thread 7 exiting. ThreadPool: thread 0 exiting. ThreadPool: thread 3 exiting. ThreadPool: thread 6 exiting. Thread pool exited in a orderly fashion. ================== WARNING: ThreadSanitizer: thread leak (pid=2292842) Thread T9 (tid=2292855, finished) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) #1 ThreadPool_Init() <null> (test_conversions+0x35b2c) #2 pthread_once ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1449 (libtsan.so.0+0x4057c) #3 GetThreadCount() <null> (test_conversions+0x36262) #4 DoTest(_cl_device_id*, Type, Type, SaturationMode, RoundingMode, _MTdata*) [clone .isra.0] <null> (test_conversions+0x10555) #5 test_conversions(_cl_device_id*, _cl_context*, _cl_command_queue*, int) <null> (test_conversions+0x13226) #6 callSingleTestFunction(test_definition, _cl_device_id*, int, int, unsigned long) <null> (test_conversions+0x2e66d) #7 parseAndCallCommandLineTests(int, char const**, _cl_device_id*, int, test_definition*, int, unsigned long, int) <null> (test_conversions+0x2fb3a) #8 runTestHarnessWithCheck(int, char const**, int, test_definition*, int, unsigned long, test_status (*)(_cl_device_id*)) <null> (test_conversions+0x349d8) #9 main <null> (test_conversions+0xd725) And 7 more similar thread leaks. SUMMARY: ThreadSanitizer: thread leak (OpenCL-CTS/buildbin/conversions/test_conversions+0x35b2c) in ThreadPool_Init() ``` This patch adds global state to keep track of the `pthread_t`s created by `pthread_create` in `ThreadPool_Init`. The list of `pthread_t`s is then used by `ThreadPool_Exit` to call `pthread_join` to cleanup the `pthread_t`s correctly. A near identical example, and additional explanation, can be found on [stackoverflow](https://stackoverflow.com/questions/72435574/thread-leak-detected-when-using-condition-variable-instead-of-join-with-pthrea). On the Windows path, a similar change is not necessary because `_beginthread` is used which automatically cleans up after itself when the worker thread function returns.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Kevin Petit kevin.petit@arm.com