Skip to content

Commit 0d51c43

Browse files
committed
Add a workaround for urEnqueue loader problems with ADAPTER_SPECIFIC
1 parent 167ddf9 commit 0d51c43

File tree

2 files changed

+92
-57
lines changed

2 files changed

+92
-57
lines changed

scripts/templates/ldrddi.cpp.mako

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,16 @@ namespace ur_loader
272272
%>
273273
%for i, item in enumerate(epilogue):
274274
%if 0 == i and not item['release'] and not item['retain'] and not th.always_wrap_outputs(obj):
275-
if( ${X}_RESULT_SUCCESS != result )
275+
## TODO: Remove once we have a concrete way for submitting warnings in place.
276+
%if re.match(r"urEnqueue\w+", th.make_func_name(n, tags, obj)):
277+
// In the event of ERROR_ADAPTER_SPECIFIC we should still attempt to wrap any output handles below.
278+
if( ${X}_RESULT_SUCCESS != result && ${X}_RESULT_ERROR_ADAPTER_SPECIFIC != result )
279+
return result;
280+
%else:
281+
if( ${X}_RESULT_SUCCESS != result)
276282
return result;
277283
284+
%endif
278285
%endif
279286
## Before we can re-enable the releases we will need ref-counted object_t.
280287
## See unified-runtime github issue #1784

0 commit comments

Comments
 (0)