File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ static auto getUrResultString = [](ur_result_t Result) {
168
168
}
169
169
};
170
170
171
- // Trace an internal PI call; returns in case of an error.
171
+ // Trace an internal UR call; returns in case of an error.
172
172
#define UR_CALL (Call ) \
173
173
{ \
174
174
if (PrintTrace) \
@@ -180,6 +180,18 @@ static auto getUrResultString = [](ur_result_t Result) {
180
180
return Result; \
181
181
}
182
182
183
+ // Trace an internal UR call; throw in case of an error.
184
+ #define UR_CALL_THROWS (Call ) \
185
+ { \
186
+ if (PrintTrace) \
187
+ logger::always (" UR ---> {}" , #Call); \
188
+ ur_result_t Result = (Call); \
189
+ if (PrintTrace) \
190
+ logger::always (" UR <--- {}({})" , #Call, getUrResultString (Result)); \
191
+ if (Result != UR_RESULT_SUCCESS) \
192
+ throw Result; \
193
+ }
194
+
183
195
// Controls UR L0 calls tracing.
184
196
enum UrDebugLevel {
185
197
UR_L0_DEBUG_NONE = 0x0 ,
You can’t perform that action at this time.
0 commit comments