[llvm] [OFFLOAD] Add plugin with support for Intel oneAPI Level Zero (PR #158900)
Alexey Sachkov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 06:23:40 PDT 2025
================
@@ -0,0 +1,193 @@
+//===--- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Code for tracing L0
+//
+//===----------------------------------------------------------------------===//
+// clang-format off
+#pragma once
+
+#include "Shared/Debug.h"
+#include "omptarget.h"
+#include <string>
+#include <level_zero/ze_api.h>
+
+#define STR(x) #x
+#define TO_STRING(x) STR(x)
+
+#define DPCALL(...) \
+ do { \
+ if (getDebugLevel() > 1) \
+ DP(__VA_ARGS__); \
+ } while (0)
+
+#define FATAL_ERROR(Msg) \
+ do { \
+ fprintf(stderr, "%s --> ", DEBUG_PREFIX); \
+ fprintf(stderr, "Error: %s failed (%s) -- exiting...\n", __func__, Msg); \
+ exit(EXIT_FAILURE); \
+ } while (0)
+
+#define WARNING(...) \
+ do { \
+ fprintf(stderr, "%s --> ", DEBUG_PREFIX); \
+ fprintf(stderr, "Warning: " __VA_ARGS__); \
+ } while (0)
----------------
AlexeySachkov wrote:
```suggestion
DP("Warning: ", __VA_ARGS__)
```
https://github.com/llvm/llvm-project/pull/158900
More information about the llvm-commits
mailing list