[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


================
@@ -110,6 +113,23 @@ DLWRAP_FINALIZE()
 #define DEBUG_PREFIX "TARGET " GETNAME(TARGET_NAME) " RTL"
 #endif
 
+// Macro used to make APIs that are returning
+// ZE_RESULT_ERROR_UNSUPPORTED_FEATURE nullptr in dlwrap.
+#define INVALIDATE_LEVEL_ZERO_API(function)                                    \
+  if (dlwrap::function##_loaded() &&                                           \
+      api_helper::callDefaulted(function) ==                                   \
----------------
311Volt wrote:

This relies on the assumption that L0 will return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE before it hits any other validation (a defaulted call would be sure to hit any `!= nullptr` or `!= 0` checks). 

Is this L0 behavior documented?

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


More information about the llvm-commits mailing list