[llvm] [offload] Fix compatibility for level_zero 25.22.33944 (PR #214215)
Jan Trusiłło via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 07:06:43 PDT 2026
================
@@ -177,16 +178,15 @@ class L0CmdListManagerTy {
ze_event_handle_t SignalEvent = nullptr,
uint32_t NumWaitEvents = 0,
ze_event_handle_t *WaitEvents = nullptr) {
- auto zeCommandListAppendHost = Context.zeCommandListAppendHostFunction;
- if (!zeCommandListAppendHost)
+ if (!api_helper::canCall<zeCommandListAppendHostFunction>())
----------------
311Volt wrote:
It could be a good idea to introduce a second layer concerned only with whether a function is supported, and keep the current meaning of `canCall`, which is to ask if the symbol is available.
I would even go as far as to introduce a global per-symbol `isKnownUnsupported` flag (stored similarly to dlwrap pointers), which is `false` if the function ever returned `ZE_RESULT_ERROR_UNSUPPORTED_FEATURE`. This would keep fallbacks practically free in terms of runtime cost
https://github.com/llvm/llvm-project/pull/214215
More information about the llvm-commits
mailing list