MLIR 22.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
14#include <memory>
15#include <string>
16
17namespace mlir {
18
20class Pass;
21
22#define GEN_PASS_DECL_ARITHTOAMDGPUCONVERSIONPASS
23#include "mlir/Conversion/Passes.h.inc"
24
25namespace arith {
26/// Add patterns for rewriting `arith.extf` and `arith.truncf` on FP8 types
27/// to wrappers around AMDGPU--specific intrinsics. If `saturateFP8TruncF`
28/// is set, values outside the range of the destination type are clamped
29/// to the largest value of that type instead of being rewritten to Inf (aka
30/// NaN).
32 RewritePatternSet &patterns, bool convertFP8Arithmetic,
33 bool saturateFP8Truncf, bool allowPackedF16Rtz, bool supportsScaledExtTrunc,
34 amdgpu::Chipset chipset, PatternBenefit benefit = 1);
35} // namespace arith
36} // namespace mlir
37
38#endif // MLIR_CONVERSION_ARITHTOAMDGPU_ARITHTOAMDGPU_H
The abstract base pass class.
Definition Pass.h:51
void populateArithToAMDGPUConversionPatterns(RewritePatternSet &patterns, bool convertFP8Arithmetic, bool saturateFP8Truncf, bool allowPackedF16Rtz, bool supportsScaledExtTrunc, amdgpu::Chipset chipset, PatternBenefit benefit=1)
Add patterns for rewriting arith.extf and arith.truncf on FP8 types to wrappers around AMDGPU–specifi...
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns