• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- ConvertGPUToSPIRVPass.h - GPU to SPIR-V conversion pass --*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Provides a pass to convert GPU ops to SPIRV ops.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_CONVERSION_GPUTOSPIRV_CONVERTGPUTOSPIRVPASS_H
14 #define MLIR_CONVERSION_GPUTOSPIRV_CONVERTGPUTOSPIRVPASS_H
15 
16 #include "mlir/Support/LLVM.h"
17 
18 #include <memory>
19 
20 namespace mlir {
21 
22 class ModuleOp;
23 template <typename T> class OperationPass;
24 
25 /// Pass to convert GPU Ops to SPIR-V ops. For a gpu.func to be converted, it
26 /// should have a spv.entry_point_abi attribute.
27 std::unique_ptr<OperationPass<ModuleOp>> createConvertGPUToSPIRVPass();
28 
29 } // namespace mlir
30 #endif // MLIR_CONVERSION_GPUTOSPIRV_CONVERTGPUTOSPIRVPASS_H
31