//===-- CompilationInterfaces.h - GPU compilation interfaces ---*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // This file defines interfaces for GPU compilation. // //===----------------------------------------------------------------------===// #ifndef MLIR_DIALECT_GPU_IR_COMPILATIONINTERFACES_H #define MLIR_DIALECT_GPU_IR_COMPILATIONINTERFACES_H #include "mlir/IR/Attributes.h" namespace llvm { class IRBuilderBase; } namespace mlir { class SymbolTable; namespace LLVM { class ModuleTranslation; } namespace gpu { enum class CompilationTarget : uint32_t; /// This class indicates that the attribute associated with this trait is a GPU /// offloading translation attribute. These kinds of attributes must implement /// an interface for handling the translation of GPU offloading operations like /// `gpu.binary` & `gpu.launch_func`. template <typename ConcreteType> class OffloadingTranslationAttrTrait : public AttributeTrait::TraitBase<ConcreteType, OffloadingTranslationAttrTrait> { … }; /// This class serves as an opaque interface for passing options to the /// `TargetAttrInterface` methods. Users of this class must implement the /// `classof` method as well as using the macros `MLIR_*_EXPLICIT_TYPE_ID` to /// ensure type safeness. Targets are free to ignore these options. class TargetOptions { … }; } // namespace gpu } // namespace mlir MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::gpu::TargetOptions) #include "mlir/Dialect/GPU/IR/CompilationAttrInterfaces.h.inc" #endif // MLIR_DIALECT_GPU_IR_COMPILATIONINTERFACES_H