Skip to content

Detect and fix p2p copy crash when accessing beyond peer's end of block. - #996

Open
stolk wants to merge 2 commits into
intel:masterfrom
stolk:fix/peer-copy-vmm-span
Open

stolk wants to merge 2 commits into
intel:masterfrom
stolk:fix/peer-copy-vmm-span

Conversation

@stolk

@stolk stolk commented Sep 11, 2026

Copy link
Copy Markdown

This MR contains two commits.

The earlier one detects when we are about the access beyond a block end. It will return a failure CPU side, instead of crashing the GPU. It adds robustness to the driver, and offers wide protection, also outside the copy-case.

The later commit avoids the incorrect copy by splitting it up where appropriate.

I have verified this to be correct on Dual Intel Arc Pro B70 setup.
Before, it would crash, with these changes, the copy succeeds.

This fixes: #995
See that issue for repro code to trigger the crash. (libze and SYCL versions available as repro.)

We cannot assume that the peer's blocks are contiguous.
This fixes a real gpu crash, triggered in real-world use.

The command will now fail cpu-side instead.
A follow-up commit will address avoiding this case.

The error now surfaces as ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY.
But an accurate zeDriverGetLastErrorDescription is set.

The guard covers all fourteen resolveAlignedAllocation callers:
appendMemoryCopyRegion
appendMemoryFill
appendImageCopy*
appendSignalEvent
appendWaitOnMemory
appendWriteToMemory

Related-To: GSD-13429
Signed-off-by: Bram Stolk <b.stolk@gmail.com>
Memory blocks on the peer are possibly not contiguous.
This means that an integral copy may not be possible.
Instead, split the copies at block-ends.

This adds a helper function to find the splits.

Verified as correct on real hardware (2x Intel Arc Pro B70) which
crashed before, but now correctly copies.

Resolves: GSD-13429
Signed-off-by: Bram Stolk <b.stolk@gmail.com>
@stolk
stolk force-pushed the fix/peer-copy-vmm-span branch from 6b5e193 to 35887ab Compare September 25, 2026 05:27
@stolk

stolk commented Sep 25, 2026

Copy link
Copy Markdown
Author

@jwarchul, I see 3828c3f is related to GSD-13429.

PR #996 is rebased on top of it and passes the L0 unit tests as BMG, PVC and DG2. It fixes the crash I reported by splitting peer copies at block ends. Would this approach fit, or are you fixing it differently internally?

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.

[GSD-13429] p2p copy will crash if peer has blocks mapped non-contiguously.

1 participant