Semaphore tests should not require clGetSemaphoreHandleForTypeKHR
The semaphore tests (for the cl_khr_semaphore extension) currently require an implementation of the function clGetSemaphoreHandleForTypeKHR, but this function is part of cl_khr_external_semaphore and is not part of cl_khr_semaphore.
Therefore, an implementation of this function should not be required for the cl_khr_semaphore tests.
The usage of clGetSemaphoreHandleForTypeKHR in cl_khr_semaphore test is coming from test_semaphores_import_export_fd. test_semaphores_import_export_fd requires cl_khr_external_sync_fd and hence should not be part of base cl_khr_semaphore tests.
@niranjanjoshi121 just for clarification, is issue #1876 the same as this one ? Thanks
test_semaphores_import_export_fd requires cl_khr_external_sync_fd and hence should not be part of base cl_khr_semaphore tests
@niranjanjoshi121 @bashbaug
According to spec cl_khr_external_semaphore_sync_fd depends on cl_khr_external_semaphore (I can't see any reference to cl_khr_external_sync_fd). Do you think I can move test_semaphores_import_export_fd to test_external_semaphore.cpp ?
Moreover, while I am working in this neighbourhood maybe we could follow cl_khr_command_buffer schema and put cl_khr_external_semaphore directory under cl_khr_semaphore (extensions/cl_khr_semaphore/cl_khr_external_semaphore) ? Just a thought.
cl_khr_external_sync_fd is a typo, the correct name should be cl_khr_external_semaphore_sync_fd. I think it should be ok to move generic import_export functionality to test_external_semaphores, but any scenarios specific to cl_khr_external_semaphore_sync_fd should probably be kept under separate cl_khr_external_semaphore_sync_fd tests.
Regarding moving cl_khr_external_semaphore directory under cl_khr_semaphore, we may want to think a little bit more. My understanding is that we have tests for each extension under extensions/<extension_name>. Moving dependent extensions under subdirectory may lead to deep nesting of directory structure. Also, would this make cl_khr_external_semaphore subtests of cl_khr_semaphore or will these remain separate tests? To some extent, both of these have some common functionality, but some differences too.