Skip to content

[UR][L0v2] Return the recorded graph on unjoined forks - #23711

Draft
KFilipek wants to merge 5 commits into
intel:syclfrom
KFilipek:agents/urt-1273-unjoined-forks-graph
Draft

KFilipek wants to merge 5 commits into
intel:syclfrom
KFilipek:agents/urt-1273-unjoined-forks-graph

Conversation

@KFilipek

@KFilipek KFilipek commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Depends on #23710. The first two commits belong to that PR; review only the last two.

When urQueueEndGraphCaptureExp fails with UR_RESULT_ERROR_GRAPH_UNJOINED_FORKS, the driver still ends the capture and hands back the (invalid) graph. L0v2 dropped that handle and leaked it. Now:

  • the graph is returned in phGraph so the application can destroy it, and the spec says so;
  • the batched queue clears its capture flag on this error;
  • tests cover the capture state and starting a new capture afterwards.

The returned graph is NEO behaviour (zeCommandListEndGraphCaptureExt writes *phGraph before returning the error). The L0 spec does not promise it.

Tested on BMG with L0 v2 (26.35: 136 pass; 26.31: 122 pass, rest skipped) and v1 (skipped).

Describe when the graph entry points, urQueueFinish and urEventWait
return the graph capture error codes. ur_api.h and the loader sources
are regenerated from the yml.
Test six of the graph error codes on in-order and out-of-order queues.
Tests that need a newer Level Zero driver are skipped on older ones.
urQueueEndGraphCaptureExp still ends the capture and returns the
recorded, invalid graph when it fails with
UR_RESULT_ERROR_GRAPH_UNJOINED_FORKS. ur_api.h and the loader sources
are regenerated from the yml.

URT-1273
The driver ends the capture and hands back the invalid graph even when
it fails with unjoined forks. Wrap that graph so it can be destroyed
instead of leaking it, and clear the batched queue's capture flag.

URT-1273
Keep the host buffers of the rejected blocking enqueue alive until the
graph is destroyed, because the failed command may already be recorded.
Use a fresh variable for the second urQueueEndGraphCaptureExp call.

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.

1 participant