[llvm] [OFFLOAD] Add plugin with support for Intel oneAPI Level Zero (PR #158900)
Kevin Sala Penades via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 11:42:58 PDT 2025
================
@@ -0,0 +1,631 @@
+//===--- Level Zero Target RTL Implementation -----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// GenericKernel implementation for SPIR-V/Xe machine
+//
+//===----------------------------------------------------------------------===//
+
+#include "L0Kernel.h"
+#include "L0Device.h"
+#include "L0Plugin.h"
+#include "L0Program.h"
+
+namespace llvm::omp::target::plugin {
+
+Error L0KernelTy::launchImpl(GenericDeviceTy &GenericDevice,
+ uint32_t NumThreads[3], uint32_t NumBlocks[3],
+ KernelArgsTy &KernelArgs,
+ KernelLaunchParamsTy LaunchParams,
+ AsyncInfoWrapperTy &AsyncInfoWrapper) const {
+
+ auto &l0Device = L0DeviceTy::makeL0Device(GenericDevice);
+ return runTargetTeamRegion(l0Device, KernelArgs, std::move(LaunchParams),
+ AsyncInfoWrapper);
----------------
kevinsala wrote:
Do you need this function? Can't be implemented it directly in `launchImpl`? Seems too much code for just forwarding the call.
https://github.com/llvm/llvm-project/pull/158900
More information about the llvm-commits
mailing list