Repository navigation
Conversation
|
Important! The new test uses a timeline semaphore because binary semaphores have a known driver issue on Linux (CMPLRLLVM-78008). Therefore, this PR verifies the general batching fix for regular command lists, but does not cover the original binary/opaque_fd path from #23242. |
There was a problem hiding this comment.
🟡 Changes recommended
The D3D12 test may create its fence on a different physical adapter than the selected SYCL device.
1 open finding
What changed in this PR
Updates bindless-image interop documentation and E2E coverage to support external semaphores on regular Level Zero command lists.
Changes:
- Replaces obsolete negative tests with bounded Vulkan and D3D12 synchronization tests.
- Exercises regular command-list batching and bidirectional semaphore signaling.
- Updates extension documentation and existing test comments.
| File | Description |
|---|---|
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_unsampled_timeline_semaphore.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_write_3d_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_write_2d_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_write_1d_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_read_3d.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_read_2d.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_image_interop_read_1d.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_buffer.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_buffer_timeline_semaphore.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_buffer_binary_semaphore.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/vulkan_sycl_2d_arithmetic.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/vulkan_interop/external_semaphore_regular_cl.cpp |
Adds bounded Vulkan timeline-semaphore coverage. |
sycl/test-e2e/bindless_images/vulkan_interop/external_semaphore_regular_cl_fails.cpp |
Removes obsolete negative test. |
sycl/test-e2e/bindless_images/examples/example_6_import_memory_and_semaphores.cpp |
Removes the immediate-list requirement from the example. |
sycl/test-e2e/bindless_images/dx12_interop/external_semaphore_regular_cl.cpp |
Adds bounded D3D12 fence coverage. |
sycl/test-e2e/bindless_images/dx12_interop/external_semaphore_regular_cl_fails.cpp |
Removes obsolete negative test. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_win32_named_semaphore.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_3D_write_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_3D_read.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_2D_write_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_2D_read.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_2D_arithmetic.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_1D_write_unsampled.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_interop_1D_read.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx12_interop/D3D12_sycl_buffer_timeline_semaphore.cpp |
Updates queue requirement comment. |
sycl/test-e2e/bindless_images/dx11_interop/read_write_unsampled.cpp |
Updates queue requirement comment. |
sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc |
Permits regular command lists and records revision 6.13. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| D3D12Context d3dCtx = createD3D12Context(); | ||
| D3D12ExportableFence extFence = createExportableFence(d3dCtx); |
iclsrc
left a comment
There was a problem hiding this comment.
Review summary: This PR drops the spec requirement that queues using external semaphores be built with immediate_command_list. It replaces the old *_regular_cl_fails.cpp tests with positive DX12 and Vulkan tests that run on an in-order queue with no_immediate_command_list, and it updates the comments in the existing interop tests to match. The L0 v1 (image.cpp) and v2 (queue_batched.cpp) adapters already submit external semaphore wait/signal immediately instead of batching them, so the spec change is consistent with the runtime.
The new tests are well designed. UR_L0_BATCH_SIZE=8 together with the marker kernel checks that the wait flushes the earlier batch. Checking that the wait event stays incomplete before the external signal confirms it really blocks. The bounded timeouts with std::_Exit keep a regression from hanging CI. I have no blocking issues. The minor points are below.
| within SYCL requires the SYCL queue to have been constructed with the | ||
| `sycl::property::queue::in_order` property. The semaphore synchronization | ||
| mechanism is not supported on the default out-of-order queues. |
There was a problem hiding this comment.
🔵 Suggestion: With this change the spec no longer restricts external semaphore use to immediate command lists. The new tests, however, need REQUIRES-INTEL-DRIVER: lin: 39758, win: 101.9030. On older L0 drivers, a semaphore wait on a regular command list could hang silently, and nothing in the spec or the runtime warns the user. Could you add an implementation note here (or a runtime check or diagnostic in the L0 adapter) saying that regular command list support depends on the backend or driver? That way users on older drivers aren't caught out.
| MarkerAtomicRef(*marker).store(0); | ||
|
|
||
| try { | ||
| constexpr uint64_t D3DSignalValue = 1; |
There was a problem hiding this comment.
🔵 Suggestion: D3DSignalValue = 1 silently relies on signalExportableFence() incrementing extFence.fenceValue from 0 to 1. If someone later adds another signal before this point, or changes the helper, the wait value and the value actually signaled will no longer match, and the test will fail with a misleading timeout. Consider using extFence.fenceValue + 1 here, or asserting extFence.fenceValue == D3DSignalValue after the signal at line 112, so the dependency is visible in the code.
|
@iclsrc Thank you for the review!! ₍ᐢ. .ᐢ₎ ₊˚⊹♡ Addressed:
|

Follow-up to #22811
Fixes #23242
Related to #23249
Summary
This is a test and documentation follow-up to #22811, which made Level Zero external semaphore wait and signal operations non-batchable. That change allows external semaphore operations to work correctly on queues backed by regular command lists when supported by the driver.
With newer drivers, the existing negative tests became invalid. They expected external semaphore operations on regular command lists to throw, but the operations are now accepted and submitted. In the Vulkan test, this resulted in a real wait being submitted for an unsignaled semaphore, followed by
wait_and_throw(), which caused the test to hang as reported in #23242.This PR replaces the obsolete negative tests with bounded positive tests and updates the bindless-images extension documentation to allow external semaphore operations on in-order queues backed by regular command lists.
Changes
external_semaphore_regular_cl_fails.cppnegative tests with positiveexternal_semaphore_regular_cl.cpptests.sycl::ext::intel::property::queue::no_immediate_command_list.UR_L0_BATCH_SIZE=8to exercise the regular command-list batching path.ext_oneapi_wait_external_semaphore:timeline_fdon Linux;timeline_win32_nt_handleon Windows.win32_nt_dx12_fence.sycl_ext_oneapi_bindless_imagesto require only an in-order queue for external semaphore operations, removing the immediate-command-list requirement.Relationship to #22811
Before #22811, an external semaphore wait or signal appended to a regular command list could remain in an open batch. A wait could deadlock because the external producer could not release a command list that had not been submitted, while an external consumer could fail to observe a signal that remained batched.
#22811 made these operations non-batchable, forcing the regular command list to be submitted. The tests added by this PR provide regression coverage for both directions:
Driver requirements
Regular command-list external semaphore support is gated on:
39758;101.9030.Windows Gen12 configurations remain marked as expected failures and continue to be tracked by #23249. Therefore, this PR is related to #23249 but does not close it.