[UR] Improve handling of error cases in urProgramLink
Note that this change includes a specification change: urProgramLink now requires the output parameter to contain either nullptr or some unspecified binary on failure.
As well as this change, a number of bugs have been fixed:
- The Level Zero adapter now correctly returns
UR_RESULT_ERROR_PROGRAM_LINK_FAILUREwhen linking fails, rather thanUR_RESULT_ERROR_UNKNOWN. - A workaround has been added for some OpenCL devices that return
CL_INVALID_BINARYrather thanCL_LINK_PROGRAM_FAILUREon linker failure. - The
phProgramhandle is wrapped in a loader handle by the loader even if an error would be returned. This is required by Level Zero, which outputs a "dummy" program to store the linker log.
Conformance tests have also been added.
Codecov Report
Attention: Patch coverage is 0% with 59 lines in your changes are missing coverage. Please review.
Project coverage is 12.41%. Comparing base (
78ef1ca) to head (da9d876). Report is 190 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #1458 +/- ##
==========================================
- Coverage 14.82% 12.41% -2.41%
==========================================
Files 250 241 -9
Lines 36220 36293 +73
Branches 4094 4124 +30
==========================================
- Hits 5369 4506 -863
- Misses 30800 31783 +983
+ Partials 51 4 -47
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
this has merged conflicts, please fix
this has merged conflicts, please fix
Unfortunately the job in https://github.com/intel/llvm/pull/13085 is failing, so I'll need to look into that first when I get the chance.
this has merged conflicts, please fix
Unfortunately the job in intel/llvm#13085 is failing, so I'll need to look into that first when I get the chance.
I don't see how rebasing this PR requires investigation into the intel/llvm failures. Sure, to get it merged they would need to not fail but that shouldn't be a blocker for rebasing this PR.
@oneapi-src/unified-runtime-native-cpu-write please review