Skip to content

Commit ea31b3e

Browse files
authored
Merge pull request #1828 from omarahmed1111/Add-workaround-fix-for-ADAPTER_SPECIFIC-return-code
Add a workaround for urEnqueue loader problems with ADAPTER_SPECIFIC
2 parents c806e99 + 0d51c43 commit ea31b3e

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
@@ -262,9 +262,16 @@ namespace ur_loader
262262
%>
263263
%for i, item in enumerate(epilogue):
264264
%if 0 == i and not item['release'] and not item['retain'] and not th.always_wrap_outputs(obj):
265-
if( ${X}_RESULT_SUCCESS != result )
265+
## TODO: Remove once we have a concrete way for submitting warnings in place.
266+
%if re.match(r"urEnqueue\w+", th.make_func_name(n, tags, obj)):
267+
// In the event of ERROR_ADAPTER_SPECIFIC we should still attempt to wrap any output handles below.
268+
if( ${X}_RESULT_SUCCESS != result && ${X}_RESULT_ERROR_ADAPTER_SPECIFIC != result )
269+
return result;
270+
%else:
271+
if( ${X}_RESULT_SUCCESS != result)
266272
return result;
267273
274+
%endif
268275
%endif
269276
## Before we can re-enable the releases we will need ref-counted object_t.
270277
## See unified-runtime github issue #1784

0 commit comments

Comments
 (0)