Skip to content

Commit 17432e4

Browse files
committed
Fixes after review 2
1 parent 6b9d38a commit 17432e4

File tree

14 files changed

+60
-78
lines changed

14 files changed

+60
-78
lines changed

unified-runtime/include/ur_api.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/adapters/level_zero/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ if(UR_BUILD_ADAPTER_L0_V2)
149149
${CMAKE_CURRENT_SOURCE_DIR}/physical_mem.cpp
150150
${CMAKE_CURRENT_SOURCE_DIR}/program.cpp
151151
${CMAKE_CURRENT_SOURCE_DIR}/helpers/kernel_helpers.cpp
152+
${CMAKE_CURRENT_SOURCE_DIR}/graph.cpp
152153
${CMAKE_CURRENT_SOURCE_DIR}/helpers/memory_helpers.cpp
153154
${CMAKE_CURRENT_SOURCE_DIR}/helpers/mutable_helpers.cpp
154155
${CMAKE_CURRENT_SOURCE_DIR}/usm_p2p.cpp

unified-runtime/source/adapters/level_zero/queue.cpp

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,9 @@ ur_result_t urQueueFlush(
930930
return Queue->executeAllOpenCommandLists();
931931
}
932932

933-
// Graph capture experimental functions - not yet supported
934-
ur_result_t urQueueBeginGraphCaptureExp(ur_queue_handle_t hQueue,
935-
void *pProperties) {
933+
ur_result_t urQueueBeginGraphCaptureExp(ur_queue_handle_t hQueue, void *pNext) {
936934
std::ignore = hQueue;
937-
std::ignore = pProperties;
935+
std::ignore = pNext;
938936
UR_LOG_LEGACY(ERR,
939937
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
940938
"{} function not implemented!", __FUNCTION__);
@@ -943,10 +941,10 @@ ur_result_t urQueueBeginGraphCaptureExp(ur_queue_handle_t hQueue,
943941

944942
ur_result_t urQueueBeginCaptureIntoGraphExp(ur_queue_handle_t hQueue,
945943
ur_exp_graph_handle_t hGraph,
946-
void *pProperties) {
944+
void *pNext) {
947945
std::ignore = hQueue;
948946
std::ignore = hGraph;
949-
std::ignore = pProperties;
947+
std::ignore = pNext;
950948
UR_LOG_LEGACY(ERR,
951949
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
952950
"{} function not implemented!", __FUNCTION__);
@@ -955,9 +953,9 @@ ur_result_t urQueueBeginCaptureIntoGraphExp(ur_queue_handle_t hQueue,
955953

956954
ur_result_t urQueueEndGraphCaptureExp(ur_queue_handle_t hQueue,
957955
ur_exp_graph_handle_t *phGraph,
958-
void *pProperties) {
956+
void *pNext) {
959957
std::ignore = hQueue;
960-
std::ignore = pProperties;
958+
std::ignore = pNext;
961959
if (phGraph)
962960
*phGraph = nullptr;
963961
UR_LOG_LEGACY(ERR,
@@ -980,28 +978,28 @@ urQueueInstantiateGraphExp(ur_exp_graph_handle_t hGraph,
980978
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
981979
}
982980

983-
ur_result_t urQueueAppendGraphExp(
984-
ur_queue_handle_t hQueue, ur_exp_executable_graph_handle_t hExecutableGraph,
985-
void *pProperties, ur_event_handle_t *phEvent, uint32_t numEventsInWaitList,
986-
const ur_event_handle_t *phEventWaitList) {
981+
ur_result_t urQueueAppendGraphExp(ur_queue_handle_t hQueue,
982+
ur_exp_executable_graph_handle_t hGraph,
983+
void *pNext, ur_event_handle_t hSignalEvent,
984+
uint32_t numWaitEvents,
985+
ur_event_handle_t *phWaitEvents) {
987986
std::ignore = hQueue;
988-
std::ignore = hExecutableGraph;
989-
std::ignore = pProperties;
990-
std::ignore = numEventsInWaitList;
991-
std::ignore = phEventWaitList;
992-
if (phEvent)
993-
*phEvent = nullptr;
987+
std::ignore = hGraph;
988+
std::ignore = pNext;
989+
std::ignore = hSignalEvent;
990+
std::ignore = numWaitEvents;
991+
std::ignore = phWaitEvents;
994992
UR_LOG_LEGACY(ERR,
995993
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
996994
"{} function not implemented!", __FUNCTION__);
997995
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
998996
}
999997

1000998
ur_result_t urQueueIsGraphCaptureEnabledExp(ur_queue_handle_t hQueue,
1001-
bool *pCaptureEnabled) {
999+
bool *hResult) {
10021000
std::ignore = hQueue;
1003-
if (pCaptureEnabled)
1004-
*pCaptureEnabled = false;
1001+
if (hResult)
1002+
*hResult = false;
10051003
UR_LOG_LEGACY(ERR,
10061004
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
10071005
"{} function not implemented!", __FUNCTION__);

unified-runtime/source/adapters/level_zero/v2/api.cpp

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -63,54 +63,4 @@ ur_result_t UR_APICALL urUSMPoolTrimToExp(ur_context_handle_t hContext,
6363
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
6464
}
6565

66-
ur_result_t urGraphCreateExp(ur_context_handle_t hContext,
67-
ur_exp_graph_handle_t *phGraph, void *pNext) {
68-
(void)hContext;
69-
(void)phGraph;
70-
(void)pNext;
71-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
72-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
73-
}
74-
75-
ur_result_t
76-
urQueueInstantiateGraphExp(ur_exp_graph_handle_t hGraph,
77-
ur_exp_executable_graph_handle_t *phExecutableGraph,
78-
void *pNext) {
79-
(void)hGraph;
80-
(void)phExecutableGraph;
81-
(void)pNext;
82-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
83-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
84-
}
85-
86-
ur_result_t urGraphDestroyExp(ur_exp_graph_handle_t hGraph) {
87-
(void)hGraph;
88-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
89-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
90-
}
91-
92-
ur_result_t urGraphExecutableGraphDestroyExp(
93-
ur_exp_executable_graph_handle_t hExecutableGraph) {
94-
(void)hExecutableGraph;
95-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
96-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
97-
}
98-
99-
ur_result_t urGraphIsEmptyExp(ur_exp_graph_handle_t hGraph, bool *hResult) {
100-
(void)hGraph;
101-
if (hResult)
102-
*hResult = false;
103-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
104-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
105-
}
106-
107-
ur_result_t urGraphDumpContentsExp(ur_exp_graph_handle_t hGraph,
108-
const char *filePath, void *pNext) {
109-
(void)hGraph;
110-
(void)filePath;
111-
(void)pNext;
112-
UR_LOG(ERR, "{} function not implemented!", __FUNCTION__);
113-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
114-
}
115-
11666
} // namespace ur::level_zero

unified-runtime/source/adapters/level_zero/v2/queue_api.cpp

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/adapters/level_zero/v2/queue_api.hpp

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/adapters/level_zero/v2/queue_immediate_in_order.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,15 @@ struct ur_queue_immediate_in_order_t : ur_object, ur_queue_t_ {
503503
*pResult = false;
504504
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
505505
}
506+
ur_result_t
507+
queueInstantiateGraphExp(ur_exp_graph_handle_t hGraph,
508+
ur_exp_executable_graph_handle_t *phExecutableGraph,
509+
void *pProperties) override {
510+
(void)hGraph;
511+
(void)phExecutableGraph;
512+
(void)pProperties;
513+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
514+
}
506515

507516
ur::RefCount RefCount;
508517
};

unified-runtime/source/adapters/level_zero/v2/queue_immediate_out_of_order.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,15 @@ struct ur_queue_immediate_out_of_order_t : ur_object, ur_queue_t_ {
557557
*pResult = false;
558558
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
559559
}
560+
ur_result_t
561+
queueInstantiateGraphExp(ur_exp_graph_handle_t hGraph,
562+
ur_exp_executable_graph_handle_t *phExecutableGraph,
563+
void *pProperties) override {
564+
(void)hGraph;
565+
(void)phExecutableGraph;
566+
(void)pProperties;
567+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
568+
}
560569

561570
ur::RefCount RefCount;
562571
};

unified-runtime/source/adapters/mock/ur_mockddi.cpp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/loader/layers/tracing/ur_trcddi.cpp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)