Skip to content

[SYCL][E2E] Make external semaphore submission checks deterministic - #23561

Open
crystarm wants to merge 2 commits into
intel:syclfrom
crystarm:fix/external-semaphore-submission-check
Open

crystarm wants to merge 2 commits into
intel:syclfrom
crystarm:fix/external-semaphore-submission-check

Conversation

@crystarm

Copy link
Copy Markdown
Contributor

Follow-up to #23399.

Fixes #23549.

Summary

The regular-command-list external semaphore tests currently infer that the preceding batch was submitted by polling a shared-USM marker written by a kernel. This indirect check has failed sporadically in the Linux DG2 postcommit configuration.

Replace the marker polling with direct checks of the Level Zero submission trace. The existing semantic checks remain in place to verify that the external semaphore wait stays incomplete before the native semaphore is signaled and completes afterwards.

Changes

  • Enable Level Zero API tracing while running the regular-command-list tests.
  • Add trace markers around the submission check.
  • Require at least two backend submissions in that range:
    • zeCommandQueueExecuteCommandLists for the Level Zero v1 adapter;
    • zeCommandListImmediateAppendCommandListsExp for the Level Zero v2
      adapter.
  • Remove the shared-USM marker, polling helper, and
    aspect-usm_shared_allocations requirement.
  • Apply the same check to the Vulkan and D3D12 variants.
  • Preserve the existing external semaphore wait and signal semantic checks.

The two submissions distinguish the intended behavior from a wait left in an open batch: one submission flushes the preceding command list and another submits the external semaphore wait.

Validation

Tested locally on Intel Iris Xe Graphics (ADL-P) with NEO
1.17.39758+10:

  • Vulkan test with Level Zero v1: PASS
  • Vulkan test with Level Zero v2: PASS
  • 10 repeated v1 runs: 10/10 PASS
  • 10 repeated v2 runs: 10/10 PASS
  • clang-format --dry-run --Werror: PASS
  • git diff --check: PASS

The test was also mutation-tested by allowing the Level Zero v1 external semaphore wait to be batched. The test failed as expected because only one zeCommandQueueExecuteCommandLists call occurred between the trace markers. After restoring the non-batchable behavior, the test passed.

The D3D12 variant could not be executed locally because the test host runs Linux.

@sarnex

sarnex commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@intel/bindless-images-reviewers @dyniols @0x12CC please prioritize this PR if possible as it fixes a sporadic test fail, thanks!

@crystarm
crystarm force-pushed the fix/external-semaphore-submission-check branch from 33cdbc5 to edff09d Compare October 20, 2026 14:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SYCL][E2E] bindless_images/vulkan_interop/external_semaphore_regular_cl.cpp fails intermittently on Linux Arc

2 participants