Skip to content

Commit

Permalink
Fix code Gen scripts for zesInit Only
Browse files Browse the repository at this point in the history
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Mar 15, 2024
1 parent 7006996 commit 7da0689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/templates/libapi.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ ${th.make_func_name(n, tags, obj)}(
{
%if re.match("Init", obj['name']):
static ${x}_result_t result = ${X}_RESULT_SUCCESS;
std::call_once(${x}_lib::context->initOnce, [flags]() {
%if re.match("zes", n):
std::call_once(${x}_lib::context->initOnceSysMan, [flags]() {
result = ${x}_lib::context->Init(flags, true);

});
Expand All @@ -80,6 +80,7 @@ ${th.make_func_name(n, tags, obj)}(
return ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );
}
%else:
std::call_once(${x}_lib::context->initOnce, [flags]() {
result = ${x}_lib::context->Init(flags, false);

if( ${X}_RESULT_SUCCESS != result )
Expand Down
2 changes: 1 addition & 1 deletion source/lib/zes_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ zesInit(
)
{
static ze_result_t result = ZE_RESULT_SUCCESS;
std::call_once(ze_lib::context->initOnce, [flags]() {
std::call_once(ze_lib::context->initOnceSysMan, [flags]() {
result = ze_lib::context->Init(flags, true);

});
Expand Down

0 comments on commit 7da0689

Please sign in to comment.