Skip to content

Commit 670b30f

Browse files
authored
Merge pull request #1150 from kswiecicki/adapters-val-adapter-refcount-fix
[UR] Fix adapter refcount tracking
2 parents 53a429f + a3bf168 commit 670b30f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/templates/valddi.cpp.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace ur_validation_layer
8282
%elif func_name == n + "AdapterRetain":
8383
if( context.enableLeakChecking && result == UR_RESULT_SUCCESS )
8484
{
85-
refCountContext.decrementRefCount(${object_param}, true);
85+
refCountContext.incrementRefCount(${object_param}, true);
8686
}
8787
%elif func_name == n + "AdapterGet":
8888
if( context.enableLeakChecking && phAdapters && result == UR_RESULT_SUCCESS )

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ __urdlllocal ur_result_t UR_APICALL urAdapterRetain(
9494
ur_result_t result = pfnAdapterRetain(hAdapter);
9595

9696
if (context.enableLeakChecking && result == UR_RESULT_SUCCESS) {
97-
refCountContext.decrementRefCount(hAdapter, true);
97+
refCountContext.incrementRefCount(hAdapter, true);
9898
}
9999

100100
return result;

0 commit comments

Comments
 (0)