KhronosGroup / KhronosGroup/OpenCL-CTS

cl_khr_command_buffer_multi_device Test Plan

Open
#1,703 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
232
Forks
235
Avg merge
8d 7h
Merged PRs (30d)
18

Description

CTS test plan for [cl_khr_command_buffer_multi_device](https://gitlab.khronos.org/opencl/OpenCL-Docs/-/merge_requests/192)

## 1 Platform Info Query

- [ ] Test platform can be queried for `CL_PLATFORM_COMMAND_BUFFER_CAPABILITIES_KHR`

## 2 Device Info Query

- [ ] Test device can be queried for `CL_DEVICE_COMMAND_BUFFER_NUM_SYNC_DEVICES_KHR` &
`CL_DEVICE_COMMAND_BUFFER_SYNC_DEVICES_KHR`

## 3 Multiple command-queues, same device

- [ ] Test case for command-buffer recording commands to multiple queues
targeting the same device:

* Query if a device supports recording a command-buffer to multiple queues with `CL_COMMAND_BUFFER_CAPABILITY_MULTIPLE_QUEUE_KHR`
* If such a device exits, create a command-buffer for that device passing > 1 queues to execute on.
* Record at least one command to each queue using `cl_sync_point_khr` to sync
* Finalize command buffer
* Enqueue
* If simultaneous enqueue is supported by the device, test enqueueing the command-buffer again while the first instance is pending
* Flush and verify results

## 3 Multiple devices with native sync

- [ ] Test case for command-buffer recording commands to command-queues
attached to different devices that can natively synchronize with `CL_DEVICE_COMMAND_BUFFER_SYNC_DEVICES_KHR`

* Query to see if device supports recording a command-queue across devices in `CL_DEVICE_COMMAND_BUFFER_SYNC_DEVICES_KHR`
* If so, create a command-buffer passing 1 queue for each device with can be
recorded against.
* Record at least one command to each queue using `cl_sync_point_khr` to sync
* Finalize command buffer
* Enqueue
* If simultaneous enqueue is supported by all devices, test enqueueing the command-buffer again while the first instance is pending
* Flush and verify results

## 4 Multiple devices with emulated sync

- [ ] Test case for command-buffer recording commands to command-queues
attached to different devices that can synchronize with `CL_COMMAND_BUFFER_PLATFORM_UNIVERSAL_SYNC_KHR`

* Query to see if a platform supports `CL_COMMAND_BUFFER_PLATFORM_UNIVERSAL_SYNC_KHR`
* If so, create a command-buffer passing 1 queue for each device in the platform.
* Record at least one command to each queue using `cl_sync_point_khr` to sync
* Finalize command buffer
* Enqueue
* If simultaneous enqueue is supported by all devices, test enqueueing the command-buffer again while the first instance is pending
* Flush and verify results

## 5 Manual Remap

- [ ] Test case for creating a remapped command-buffer with `clRemapCommandBufferKHR` using the same number of queues.

* Query to see if a platform supports `CL_COMMAND_BUFFER_PLATFORM_REMAP_QUEUES_KHR`.
* If so, create a command-buffer using a single queue
* Record at least one command using `cl_sync_point_khr` to sync
* (a) Call `clRemapCommandBufferKHR` with another queue. If the platform has another device, then use a queue to the other
device. Otherwise, use a queue to the same device with different properties.
* Finalize both command-buffers
* (b) Call `clRemapCommandBufferKHR` on original command-buffer with another queue. If the platform has another device, then use a queue to the other device. Otherwise, use a queue to the same device with different properties. May be same queue as (a).
* Enqueue original command-buffer, command-buffer (a) and command-buffer (b).
* If simultaneous enqueue is supported, `clRemapCommandBufferKHR` could be tested again on a command-buffer in the pending state.
* Flush and verify results
* Query remapped command-buffers with `clGetCommandBufferInfoKHR` and check returned values are okay

## 6 Automatic Remap

- [ ] Test case for creating a remapped command-buffer with `clRemapCommandBufferKHR` using a different same number of queues.

* Query to see if a platform supports `CL_COMMAND_BUFFER_PLATFORM_AUTOMATIC_REMAP_KHR`.
* If so, create a command-buffer using a single queue
* Record at least as many commands as there are devices on the platform using `cl_sync_point_khr` to sync
* Finalize command-buffer
* Call `clRemapCommandBufferKHR` on command-buffer with queues to all the devices on the platform, or if only one device then two queues to the same device.
* Enqueue original command-buffer and remapped command-buffer
* Flush and verify results
* Query remapped command-buffer with `clGetCommandBufferInfoKHR` and check the returned values.

## 7 Multiple queue execution status

- [ ] Test `CL_EVENT_COMMAND_EXECUTION_STATUS` when a command-buffer
has commands recorded to multiple command-queues:

* Query if device supports recording a command-buffer against multiple queues.
* If so, create command-buffer targeting multiple queues
* Record a command to each queue, finalize.
* Enqueue command-buffer blocked on user-event, returning an output event
* Check event execution status
* unblock user event and flush()
* Check event execution status

## 8 Multiple queue profiling

- [ ] Test profiling of a command-buffer where commands are recorded to a
different command-queues, potentially on different devices:

* Query if device supports recording a command-buffer against multiple queues.
* If so, create command-buffer with `CL_COMMAND_BUFFER_PROFILING_ENABLE_KHR` targeting
multiple queues
* Record a command to each queue, finalize and enqueue returning an event
* Check event profiling queries succeed

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or existing test entry points are named. Start by locating the CTS command-buffer tests and comparing them with the eight requested sections, including multi-queue, multi-device, remapping, execution status, and profiling coverage. Done means the checklist scenarios are implemented and their results and queries are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.