mirror of
https://github.com/clang-retro/llvm.git
synced 2026-11-28 13:19:18 -08:00
Replace libomptarget namespaces and header guards with liboffload equivalents. Mostly mechanical work by Claude. --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
//===--- 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// External and other auxilary definitions.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_LEVEL_ZERO_L0DEFS_H
|
|
#define OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_LEVEL_ZERO_L0DEFS_H
|
|
|
|
#include "OffloadError.h"
|
|
|
|
enum class AllocOptionTy : int32_t {
|
|
ALLOC_OPT_NONE = 0,
|
|
ALLOC_OPT_REDUCTION_SCRATCH = 1,
|
|
ALLOC_OPT_REDUCTION_COUNTER = 2,
|
|
ALLOC_OPT_HOST_MEM = 3,
|
|
ALLOC_OPT_SLM = 4,
|
|
};
|
|
|
|
// Level Zero debug types
|
|
constexpr const char *OLDT_ZeDispatcher = "ZeDispatcher";
|
|
|
|
namespace llvm::offload::plugin {
|
|
|
|
/// Default alignmnet for allocation.
|
|
constexpr size_t L0DefaultAlignment = 0;
|
|
/// USM allocation threshold where preallocation does not pay off (128MB).
|
|
constexpr size_t L0UsmPreAllocThreshold = (128 << 20);
|
|
/// Host USM allocation threshold where preallocation does not pay off (8MB).
|
|
constexpr size_t L0HostUsmPreAllocThreshold = (8 << 20);
|
|
/// Maximum wait time.
|
|
constexpr uint64_t L0DefaultTimeout = std::numeric_limits<uint64_t>::max();
|
|
/// Generic L0 handle type.
|
|
using ZeHandleTy = void *;
|
|
|
|
using error::ErrorCode;
|
|
} // namespace llvm::offload::plugin
|
|
|
|
#endif // OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_LEVEL_ZERO_L0DEFS_H
|