Skip to content

Commit 6b9d38a

Browse files
committed
Fix build error on CI
1 parent b4e953a commit 6b9d38a

File tree

5 files changed

+200
-1
lines changed

5 files changed

+200
-1
lines changed

unified-runtime/scripts/core/exp-graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ params:
9090
desc: "[in] Handle of the queue on which to end graph capture."
9191
- type: $x_exp_graph_handle_t*
9292
name: phGraph
93-
desc: "[out] Pointer to the handle of the recorded graph object. If $xGraphBeginCaptureIntoGraphExp
93+
desc: "[out] Pointer to the handle of the recorded graph object. If $xQueueBeginCaptureIntoGraphExp
9494
was used to begin the capture, then phGraph will contain the same graph that was passed to it."
9595
- type: void*
9696
name: pNext

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if(UR_BUILD_ADAPTER_L0)
5252
${CMAKE_CURRENT_SOURCE_DIR}/sampler.cpp
5353
${CMAKE_CURRENT_SOURCE_DIR}/image.cpp
5454
${CMAKE_CURRENT_SOURCE_DIR}/image_common.cpp
55+
${CMAKE_CURRENT_SOURCE_DIR}/graph.cpp
5556
${CMAKE_CURRENT_SOURCE_DIR}/helpers/kernel_helpers.cpp
5657
${CMAKE_CURRENT_SOURCE_DIR}/helpers/memory_helpers.cpp
5758
${CMAKE_CURRENT_SOURCE_DIR}/helpers/mutable_helpers.cpp
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
//===--------- graph.cpp - Level Zero Adapter -----------------------------===//
2+
//
3+
// Copyright (C) 2023 Intel Corporation
4+
//
5+
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
6+
// Exceptions. See LICENSE.TXT
7+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8+
//
9+
//===----------------------------------------------------------------------===//
10+
11+
#include "common.hpp"
12+
#include "ur_interface_loader.hpp"
13+
#include "ur_level_zero.hpp"
14+
15+
namespace ur::level_zero {
16+
17+
// Graph experimental functions - not yet supported
18+
ur_result_t urGraphCreateExp(ur_context_handle_t hContext,
19+
ur_exp_graph_handle_t *phGraph,
20+
void *pProperties) {
21+
std::ignore = hContext;
22+
std::ignore = pProperties;
23+
if (phGraph)
24+
*phGraph = nullptr;
25+
UR_LOG_LEGACY(ERR,
26+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
27+
"{} function not implemented!", __FUNCTION__);
28+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
29+
}
30+
31+
ur_result_t urGraphDestroyExp(ur_exp_graph_handle_t hGraph) {
32+
std::ignore = hGraph;
33+
UR_LOG_LEGACY(ERR,
34+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
35+
"{} function not implemented!", __FUNCTION__);
36+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
37+
}
38+
39+
ur_result_t urGraphExecutableGraphDestroyExp(
40+
ur_exp_executable_graph_handle_t hExecutableGraph) {
41+
std::ignore = hExecutableGraph;
42+
UR_LOG_LEGACY(ERR,
43+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
44+
"{} function not implemented!", __FUNCTION__);
45+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
46+
}
47+
48+
ur_result_t urGraphIsEmptyExp(ur_exp_graph_handle_t hGraph, bool *pIsEmpty) {
49+
std::ignore = hGraph;
50+
if (pIsEmpty)
51+
*pIsEmpty = false;
52+
UR_LOG_LEGACY(ERR,
53+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
54+
"{} function not implemented!", __FUNCTION__);
55+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
56+
}
57+
58+
ur_result_t urGraphDumpContentsExp(ur_exp_graph_handle_t hGraph,
59+
const char *pDotFilePath,
60+
void *pProperties) {
61+
std::ignore = hGraph;
62+
std::ignore = pDotFilePath;
63+
std::ignore = pProperties;
64+
UR_LOG_LEGACY(ERR,
65+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
66+
"{} function not implemented!", __FUNCTION__);
67+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
68+
}
69+
70+
} // namespace ur::level_zero

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

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,84 @@ 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) {
936+
std::ignore = hQueue;
937+
std::ignore = pProperties;
938+
UR_LOG_LEGACY(ERR,
939+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
940+
"{} function not implemented!", __FUNCTION__);
941+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
942+
}
943+
944+
ur_result_t urQueueBeginCaptureIntoGraphExp(ur_queue_handle_t hQueue,
945+
ur_exp_graph_handle_t hGraph,
946+
void *pProperties) {
947+
std::ignore = hQueue;
948+
std::ignore = hGraph;
949+
std::ignore = pProperties;
950+
UR_LOG_LEGACY(ERR,
951+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
952+
"{} function not implemented!", __FUNCTION__);
953+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
954+
}
955+
956+
ur_result_t urQueueEndGraphCaptureExp(ur_queue_handle_t hQueue,
957+
ur_exp_graph_handle_t *phGraph,
958+
void *pProperties) {
959+
std::ignore = hQueue;
960+
std::ignore = pProperties;
961+
if (phGraph)
962+
*phGraph = nullptr;
963+
UR_LOG_LEGACY(ERR,
964+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
965+
"{} function not implemented!", __FUNCTION__);
966+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
967+
}
968+
969+
ur_result_t
970+
urQueueInstantiateGraphExp(ur_exp_graph_handle_t hGraph,
971+
ur_exp_executable_graph_handle_t *phExecutableGraph,
972+
void *pProperties) {
973+
std::ignore = hGraph;
974+
std::ignore = pProperties;
975+
if (phExecutableGraph)
976+
*phExecutableGraph = nullptr;
977+
UR_LOG_LEGACY(ERR,
978+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
979+
"{} function not implemented!", __FUNCTION__);
980+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
981+
}
982+
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) {
987+
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;
994+
UR_LOG_LEGACY(ERR,
995+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
996+
"{} function not implemented!", __FUNCTION__);
997+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
998+
}
999+
1000+
ur_result_t urQueueIsGraphCaptureEnabledExp(ur_queue_handle_t hQueue,
1001+
bool *pCaptureEnabled) {
1002+
std::ignore = hQueue;
1003+
if (pCaptureEnabled)
1004+
*pCaptureEnabled = false;
1005+
UR_LOG_LEGACY(ERR,
1006+
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
1007+
"{} function not implemented!", __FUNCTION__);
1008+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
1009+
}
1010+
9331011
} // namespace ur::level_zero
9341012

9351013
// Configuration of the command-list batching.

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,54 @@ 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+
66116
} // namespace ur::level_zero

0 commit comments

Comments
 (0)