Skip to content

[SYCL][L0v2] Enable verified Level Zero adapter tests - #23027

Draft
kekaczma wants to merge 14 commits into
intel:syclfrom
kekaczma:enable-l0v2-tests
Draft

kekaczma wants to merge 14 commits into
intel:syclfrom
kekaczma:enable-l0v2-tests

Conversation

@kekaczma

@kekaczma kekaczma commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR reviews a set of Level Zero tests previously marked as unsupported with the L0v2 adapter and enables those for which meaningful L0v2 coverage can be provided while preserving the original test intent.

The following tests are enabled:

  • Adapters/level_zero/queue_create.cpp
  • Adapters/queue_submit_mode.cpp
  • Adapters/level_zero/queue_priority.cpp
  • Adapters/level_zero/interop-direct.cpp
  • Adapters/level_zero/events_caching.cpp

Where necessary, the tests are adapted to account for differences in the L0v2 implementation rather than reproducing V1-specific implementation details. The updated checks preserve the semantic intent of the original tests while validating the corresponding L0v2 behavior.

The remaining investigated tests stay UNSUPPORTED for L0v2. The analysis identified several different reasons:

  • some tests validate Legacy-specific configuration controls or implementation mechanisms that do not have a meaningful direct equivalent in L0v2;
  • some existing tests are V1-specific, while the related L0v2 functionality may require separate V2-specific coverage;
  • some cases require clarification of the intended L0v2 behavior or compatibility contract before the appropriate test strategy can be determined;
  • Graph/NativeCommand tests are blocked by an existing L0v2 functional issue rather than by test expectations.

Where appropriate, UNSUPPORTED-INTENDED annotations are updated to document why an existing test should remain unsupported and to distinguish intentional V1-specific coverage from cases requiring follow-up work.

The analysis also identified follow-up areas around L0v2 batched submission, copy-offload test coverage, and USM residency/configuration behavior. These require separate architectural clarification or implementation/test work and are intentionally left outside the scope of this PR.

- v2/usm.cpp: recognize legacy SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR(_TRACE)
  env vars as fallback for UR_L0_USM_ALLOCATOR(_TRACE), matching the
  v1 adapter's existing dual-name precedent. Fixes usm_pooling.cpp
  which only sets the legacy env var name.

- queue_submit_mode.cpp: v2 out-of-order immediate queues create a
  fixed numCommandLists=4 immediate command lists (see
  queue_immediate_out_of_order.hpp), not 2. Add v2-specific CHECK.

- queue_create.cpp: default (out-of-order) queue on v2 never calls
  zeCommandQueueCreate directly; it creates 4 immediate command lists
  once via the command list cache. Add v2-specific CHECK verifying
  a single set of command lists is created/destroyed for the whole run.
v2 always creates numCommandLists=4 immediate command lists for an
out-of-order queue (queue_immediate_out_of_order.hpp), ignoring the
legacy UR_L0_USE_IMMEDIATE_COMMANDLISTS=1 vs =2 mode distinction.
CI confirmed: zeCommandListCreateImmediate = 4 for the mode=1 case
where v1/the test expected 2.
…RTED

Keep enabled (CI-confirmed working on BMG/PVC/Arc Linux + BMG Windows,
with v2-specific CHECK/adapter-log additions where needed):
- Adapters/level_zero/queue_create.cpp
- Adapters/queue_submit_mode.cpp
- Adapters/level_zero/queue_priority.cpp (+ small v2 adapter log addition
  in command_list_cache.cpp so the resolved priority is observable)
- Adapters/level_zero/interop-direct.cpp (+ new v2-only build variant
  exercising the make_queue() model v2 actually supports)

Revert to UNSUPPORTED: level_zero_v2_adapter (confirmed still failing/
timing out on v2, or false-positive passes not indicating real support):
- Adapters/level_zero/batch_barrier.cpp
- Adapters/level_zero/batch_event_status.cpp
- Adapters/level_zero/batch_test.cpp
- Adapters/level_zero/batch_test_copy_with_compute.cpp
- Adapters/level_zero/device_scope_events.cpp
- Adapters/level_zero/dynamic_batch_test.cpp
- Adapters/level_zero/eager_init.cpp (passes only because v2 always
  eagerly creates its immediate command lists, not because it honors
  SYCL_EAGER_INIT)
- Adapters/level_zero/events_caching.cpp
- Adapters/level_zero/imm_cmdlist_per_thread.cpp (relies on v2's
  hardcoded numCommandLists=4, an internal detail not a stable contract)
- Adapters/level_zero/memory_fill.cpp
- Adapters/level_zero/usm_residency.cpp
- Graph/NativeCommand/level-zero_usm.cpp
- Graph/NativeCommand/level-zero_usm_D2H_copy.cpp
- USM/usm_pooling.cpp
@kekaczma kekaczma changed the title [SYCL][L0v2] Enable queue_priority, usm_residency, queue_submit_mode tests [SYCL][L0v2] Enable verified Level Zero adapter tests Sep 11, 2026
@kekaczma

Copy link
Copy Markdown
Contributor Author

Failing test case is related with other issue #19468

@kekaczma
kekaczma marked this pull request as ready for review September 29, 2026 13:08
@kekaczma
kekaczma requested review from a team as code owners September 29, 2026 13:08

@ldorau ldorau left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix failing "Self build / Build + LIT" CI job: it needs the UNSUPPORTED-INTENDED: or UNSUPPORTED-TRACKER: line restored after UNSUPPORTED: level_zero_v2_adapter in usm_residency.cpp (line 3) and usm_pooling.cpp (line 5).

@kekaczma
kekaczma marked this pull request as draft October 9, 2026 09:01

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.

2 participants