Skip to content

Commit

Permalink
Report success for urProgramCompile and urProgramLink
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroGhg committed Oct 4, 2024
1 parent 00f958f commit 4a67df2
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions source/adapters/native_cpu/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ urProgramCompile(ur_context_handle_t hContext, ur_program_handle_t hProgram,
std::ignore = hProgram;
std::ignore = pOptions;

DIE_NO_IMPLEMENTATION
// Currently for Native CPU the program is offline compiled, so
// urProgramCompile is a no-op.
return UR_RESULT_SUCCESS;
}

UR_APIEXPORT ur_result_t UR_APICALL
Expand All @@ -138,21 +140,27 @@ urProgramLink(ur_context_handle_t hContext, uint32_t count,
std::ignore = phPrograms;
std::ignore = pOptions;

DIE_NO_IMPLEMENTATION
// Currently for Native CPU the program is already linked and all its
// symbols are resolved, so this is a no-op.
return UR_RESULT_SUCCESS;
}

UR_APIEXPORT ur_result_t UR_APICALL urProgramCompileExp(ur_program_handle_t,
uint32_t,
ur_device_handle_t *,
const char *) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
// Currently for Native CPU the program is offline compiled, so
// urProgramCompile is a no-op.
return UR_RESULT_SUCCESS;
}

UR_APIEXPORT ur_result_t UR_APICALL urProgramBuildExp(ur_program_handle_t,
uint32_t,
ur_device_handle_t *,
const char *) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
// Currently for Native CPU the program is offline compiled and linked,
// so urProgramBuild is a no-op.
return UR_RESULT_SUCCESS;
}

UR_APIEXPORT ur_result_t UR_APICALL urProgramLinkExp(
Expand All @@ -161,7 +169,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramLinkExp(
if (nullptr != phProgram) {
*phProgram = nullptr;
}
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
// Currently for Native CPU the program is already linked and all its
// symbols are resolved, so this is a no-op.
return UR_RESULT_SUCCESS;
}

UR_APIEXPORT ur_result_t UR_APICALL
Expand Down

0 comments on commit 4a67df2

Please sign in to comment.