Skip to content

Commit

Permalink
Add Passing in the Result to Validation Checkers at Epilogue (#235)
Browse files Browse the repository at this point in the history
* Add Passing in the Result to Validation Checkers at Epilogue
* Always return the Driver Result in validation layer
* Update Copyright

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit authored Nov 15, 2024
1 parent ea296eb commit 398628e
Show file tree
Hide file tree
Showing 8 changed files with 1,691 additions and 1,691 deletions.
4 changes: 2 additions & 2 deletions scripts/templates/validation/entry_points.h.mako
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from templates import helper as th
* ***THIS FILE IS GENERATED. ***
* See entry_points.h.mako for modifications
*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand All @@ -36,7 +36,7 @@ ${line} \
%for line in th.make_param_lines(n, tags, obj, format=["type", "name", "delim"]):
${line} \
%endfor
) {return ZE_RESULT_SUCCESS;}
, ze_result_t result) {return ZE_RESULT_SUCCESS;}
%endfor
virtual ~${N}ValidationEntryPoints() {}
};
Expand Down
10 changes: 5 additions & 5 deletions scripts/templates/validation/valddi.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from templates import helper as th
* ***THIS FILE IS GENERATED. ***
* See valddi.cpp.mako for modifications
*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -68,20 +68,20 @@ ${line} \
if(result!=${X}_RESULT_SUCCESS) return result;
}

auto result = ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );
auto driver_result = ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );

for (size_t i = 0; i < numValHandlers; i++) {
auto result = context.validationHandlers[i]->${n}Validation->${th.make_func_name(n, tags, obj)}Epilogue( \
% for line in th.make_param_lines(n, tags, obj, format=['name','delim']):
${line} \
%endfor
);
,driver_result);
if(result!=${X}_RESULT_SUCCESS) return result;
}

%if generate_post_call:

if( result == ${X}_RESULT_SUCCESS && context.enableHandleLifetime ){
if( driver_result == ${X}_RESULT_SUCCESS && context.enableHandleLifetime ){
## Add 'Created' handles/objects to dependent maps
<% lines = th.make_param_lines(n, tags, obj, format=['name','delim'])
%>
Expand Down Expand Up @@ -111,7 +111,7 @@ ${line} \
%endfor
}
%endif
return result;
return driver_result;
}
%if 'condition' in obj:
#endif // ${th.subt(n, tags, obj['condition'])}
Expand Down
378 changes: 189 additions & 189 deletions source/layers/validation/common/ze_entry_points.h

Large diffs are not rendered by default.

298 changes: 149 additions & 149 deletions source/layers/validation/common/zes_entry_points.h

Large diffs are not rendered by default.

134 changes: 67 additions & 67 deletions source/layers/validation/common/zet_entry_points.h

Large diffs are not rendered by default.

Loading

0 comments on commit 398628e

Please sign in to comment.