[llvm] [OFFLOAD][L0] Add support for dynamic l0 fallbacks (PR #200517)

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 08:09:26 PDT 2026


================
@@ -150,16 +255,23 @@ static bool loadLevelZero() {
     const char *Sym = dlwrap::symbol(I);
 
     void *P = DynlibHandle->getAddressOfSymbol(Sym);
+    void *Fallback = nullptr;
     if (P == nullptr) {
-      ODBG(OLDT_Init) << "Unable to find '" << Sym << "' in '" << L0Library
-                      << "'!";
-      emitCheckVersion();
-      return false;
+      Fallback = findZeFallback(Sym);
+      if (!Fallback) {
+        ODBG(OLDT_Init) << "Symbol '" << Sym << "' not found in '" << L0Library
+                        << "' and no fallback is available!";
+        emitCheckVersion();
----------------
adurang wrote:

We're not requiring zeCommandListAppendLaunchKernelWithArguments to be there, only using it if it's there.

https://github.com/llvm/llvm-project/pull/200517


More information about the llvm-commits mailing list