[llvm] [offload] Fix compatibility for level_zero 25.22.33944 (PR #214215)

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 06:09:41 PDT 2026


================
@@ -53,6 +55,29 @@ template <auto Fn> bool canCall() {
                 "decorated with API_HELPER_OPTIONAL!");
 }
 
+// Currently APIHelpers.h supports only interatctions with lvalue references
+template <typename Fn> struct FunctionArgs {
+  static_assert(sizeof(Fn) == 0,
+                "FunctionArgs: Fn should be an lvalue reference to a function! "
+                "Supported form: R(A...).");
+};
+// Arguments to a function are just a tuple with all the types inside
+template <typename ReturnType, typename... ArgsTypes>
+struct FunctionArgs<ReturnType(ArgsTypes...)> {
+  using type = std::tuple<ArgsTypes...>;
+};
+
+// Template to call function with all arguments initialized
+// with default values, so we can check if APIs are not returning
+// any kind of NOT_SUPPORTED errors
+template <typename Fn> auto callDefaulted(Fn &FunctionByLValue) {
----------------
adurang wrote:

What about callWithDefaultArgs?

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


More information about the llvm-commits mailing list