Skip to content

[UR][L0] Disable USM residency P2P restriction by default - #22796

Open
ldorau wants to merge 1 commit into
intel:syclfrom
ldorau:URL0_Disable_USM_residency_P2P_restriction_by_default
Open

[UR][L0] Disable USM residency P2P restriction by default#22796
ldorau wants to merge 1 commit into
intel:syclfrom
ldorau:URL0_Disable_USM_residency_P2P_restriction_by_default

Conversation

@ldorau

@ldorau ldorau commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Disable the "Restrict USM residency to peers with enabled P2P access"
feature by default: P2P access is now treated as enabled for all
connectable peer devices out of the box, so USM allocations are made
resident on all of them without requiring an explicit
ext_oneapi_enable_peer_access() call. When the restriction is disabled,
urUsmP2P(Enable|Disable)PeerAccessExp become no-ops that always return
success, matching the behavior of the Level Zero V1 adapter.

Add the SYCL_UR_L0_RESTRICT_USM_RESIDENCY_TO_P2P environment variable
to opt back into the restrictive behavior on demand, requiring P2P
access to be explicitly enabled for a peer before USM allocations
become resident on it, and enforcing the enable/disable state machine.

Update the tests that exercise this feature
(sycl/test-e2e/USM/P2P/p2p_usm_residency.cpp and
unified-runtime/test/adapters/level_zero/v2/memory_residency.cpp) to
set the new environment variable so they keep testing the restrictive
behavior. Document the new variable in EnvironmentVariables.md.

Ref: #21889
Ref: MLSL-4536

@ldorau
ldorau force-pushed the URL0_Disable_USM_residency_P2P_restriction_by_default branch from 531952b to fd450f2 Compare July 29, 2026 09:51
@ldorau
ldorau marked this pull request as ready for review July 29, 2026 10:04
@ldorau
ldorau requested review from a team as code owners July 29, 2026 10:04
@ldorau
ldorau requested a review from sergey-semenov July 29, 2026 10:04
@ldorau

ldorau commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Please review @intel/dpcpp-doc-reviewers, @intel/llvm-reviewers-runtime, and/or @intel/unified-runtime-reviewers-level-zero.

@ldorau
ldorau requested a review from pbalcer July 29, 2026 10:05
Comment thread sycl/test-e2e/USM/P2P/p2p_usm_residency.cpp Outdated

@pbalcer pbalcer 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.

mostly lgtm, one nit for the test change.

@ldorau
ldorau force-pushed the URL0_Disable_USM_residency_P2P_restriction_by_default branch from fd450f2 to 1e2a8f9 Compare July 29, 2026 10:26
Disable the "Restrict USM residency to peers with enabled P2P access"
feature by default: P2P access is now treated as enabled for all
connectable peer devices out of the box, so USM allocations are made
resident on all of them without requiring an explicit
ext_oneapi_enable_peer_access() call. When the restriction is disabled,
urUsmP2P(Enable|Disable)PeerAccessExp become no-ops that always return
success, matching the behavior of the Level Zero V1 adapter.

Add the SYCL_UR_L0_RESTRICT_USM_RESIDENCY_TO_P2P environment variable
to opt back into the restrictive behavior on demand, requiring P2P
access to be explicitly enabled for a peer before USM allocations
become resident on it, and enforcing the enable/disable state machine.

Update the tests that exercise this feature
(sycl/test-e2e/USM/P2P/p2p_usm_residency.cpp and
unified-runtime/test/adapters/level_zero/v2/memory_residency.cpp) to
set the new environment variable so they keep testing the restrictive
behavior. Document the new variable in EnvironmentVariables.md.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@ldorau
ldorau requested a review from kswiecicki July 29, 2026 12:50
@ldorau

ldorau commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@kswiecicki please review. The CI failure is unrelated (issue #22812).

@ldorau

ldorau commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Please review @intel/dpcpp-doc-reviewers and/or @intel/llvm-reviewers-runtime. The CI failure is unrelated (issue #22812).

@ldorau

ldorau commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Please review @intel/dpcpp-doc-reviewers and/or @intel/llvm-reviewers-runtime. The CI failure is unrelated (issue #22812).

@ldorau

ldorau commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Please review @sergey-semenov. The CI failure is unrelated (issue #22812).

@ldorau

ldorau commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Please review @intel/dpcpp-doc-reviewers. The CI failure is unrelated (issue #22812).

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.

4 participants