Skip to content

Commit

Permalink
[SYCL][Graph] Backend integration and feature additions for SYCL Grap…
Browse files Browse the repository at this point in the history
…hs (3/4) (#10033)

# Backend integration and feature additions for SYCL Graphs
This is the third patch of a series that adds support for an
[experimental command graph
extension](intel/llvm#5626)

A snapshot of the complete work can be seen in draft PR #9375 which has
support all the specification defined ways of
adding nodes and edges to the graph, including both Explicit and Record
& Replay graph construction. The two types of nodes currently
implemented are kernel execution and memcpy commands.

See https://github.com/reble/llvm#implementation-status for the status
of our total work.

## Scope
This third patch focuses on integrating the graphs runtime with the
backend support added in #9992 as well as any remaining runtime features
and bug fixes, and should include no ABI-breaking changes:
* Graphs runtime changes to use PI/UR command-buffers.
* Various improvements to the Graphs runtime classes.
* New memory manager methods for appending copies to a command-buffer.
* Changes to the Scheduler and related CG classes to enable Graphs.
* Device info query for command-graph support.
* Minor changes to some runtime classes to enable Graphs.

## Following Split PRs
Future follow-up PRs with the remainder of our work on the extension
will include:
* Add end-to-end tests for SYCL Graph extension. (4/4)
* NFC changes - Design doc and codeowner update.

## Authors
Co-authored-by: Pablo Reble <[email protected]>
Co-authored-by: Julian Miller <[email protected]>
Co-authored-by: Ben Tracy <[email protected]>
Co-authored-by: Ewan Crawford <[email protected]>
Co-authored-by: Maxime France-Pillois
<[email protected]>
  • Loading branch information
Bensuo authored and omarahmed1111 committed Oct 23, 2023
1 parent b80ab52 commit 8532d21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferCopyExp(
uint32_t NumSyncPointsInWaitList,
const ur_exp_command_buffer_sync_point_t *SyncPointWaitList,
ur_exp_command_buffer_sync_point_t *SyncPoint) {
(void)SrcOffset;
(void)DstOffset;

auto SrcBuffer = ur_cast<ur_mem_handle_t>(SrcMem);
auto DstBuffer = ur_cast<ur_mem_handle_t>(DstMem);

Expand All @@ -553,8 +550,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferCopyExp(
CommandBuffer->Device));

return enqueueCommandBufferMemCopyHelper(
UR_COMMAND_MEM_BUFFER_COPY, CommandBuffer, ZeHandleDst, ZeHandleSrc, Size,
NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
UR_COMMAND_MEM_BUFFER_COPY, CommandBuffer, ZeHandleDst + DstOffset,
ZeHandleSrc + SrcOffset, Size, NumSyncPointsInWaitList, SyncPointWaitList,
SyncPoint);
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferCopyRectExp(
Expand Down
3 changes: 3 additions & 0 deletions device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
(Device->ZeDeviceProperties->deviceId & 0xff0) == 0xbd0)
SupportedExtensions += ("cl_intel_bfloat16_conversions ");

// Return supported for the UR command-buffer experimental feature
SupportedExtensions += ("ur_exp_command_buffer ");

return ReturnValue(SupportedExtensions.c_str());
}
case UR_DEVICE_INFO_NAME:
Expand Down

0 comments on commit 8532d21

Please sign in to comment.