MLIR  19.0.0git
ArithToAMDGPU.h
Go to the documentation of this file.
1 //===- ArithToAMDGPU.h - Arith to AMDGPU dialect conversion ---*- 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 #ifndef MLIR_CONVERSION_ARITHTOAMDGPU_ARITHTOAMDGPU_H
10 #define MLIR_CONVERSION_ARITHTOAMDGPU_ARITHTOAMDGPU_H
11 
12 #include <memory>
13 
14 namespace mlir {
15 
16 class RewritePatternSet;
17 class Pass;
18 
19 #define GEN_PASS_DECL_ARITHTOAMDGPUCONVERSIONPASS
20 #include "mlir/Conversion/Passes.h.inc"
21 
22 namespace arith {
23 /// Add patterns for rewriting `arith.extf` and `arith.truncf` on FP8 types
24 /// to wrappers around AMDGPU--specific intrinsics. If `saturateFP8TruncF`
25 /// is set, values outside the range of the destination type are clamped
26 /// to the largest value of that type instead of being rewritten to Inf (aka
27 /// NaN).
28 void populateArithToAMDGPUConversionPatterns(RewritePatternSet &patterns,
29  bool saturateFP8TruncF);
30 } // namespace arith
31 } // namespace mlir
32 
33 #endif // MLIR_CONVERSION_ARITHTOAMDGPU_ARITHTOAMDGPU_H
void populateArithToAMDGPUConversionPatterns(RewritePatternSet &patterns, bool saturateFP8TruncF)
Add patterns for rewriting arith.extf and arith.truncf on FP8 types to wrappers around AMDGPU–specifi...
Include the generated interface declarations.