MLIR
23.0.0git
include
mlir
Conversion
VectorToSPIRV
VectorToSPIRV.h
Go to the documentation of this file.
1
//=- VectorToSPIRV.h - Vector to SPIR-V Patterns ------------------*- 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 patterns to convert Vector dialect to SPIR-V dialect.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef MLIR_CONVERSION_VECTORTOSPIRV_VECTORTOSPIRV_H
14
#define MLIR_CONVERSION_VECTORTOSPIRV_VECTORTOSPIRV_H
15
16
#include "
mlir/Transforms/DialectConversion.h
"
17
18
namespace
mlir
{
19
class
SPIRVTypeConverter
;
20
21
/// Appends to a pattern list additional patterns for translating Vector Ops to
22
/// SPIR-V ops.
23
void
populateVectorToSPIRVPatterns
(
const
SPIRVTypeConverter
&typeConverter,
24
RewritePatternSet
&patterns);
25
26
/// Appends patterns to convert vector reduction of the form:
27
/// ```
28
/// vector.reduction <add>, (muli (ext %lhs), (ext %rhs)), [%acc]
29
/// ```
30
///
31
/// to SPIR-V integer dot product ops.
32
void
populateVectorReductionToSPIRVDotProductPatterns
(
33
RewritePatternSet
&patterns);
34
35
}
// namespace mlir
36
37
#endif
// MLIR_CONVERSION_VECTORTOSPIRV_VECTORTOSPIRV_H
DialectConversion.h
mlir::RewritePatternSet
Definition
PatternMatch.h:822
mlir::SPIRVTypeConverter
Type conversion from builtin types to SPIR-V types for shader interface.
Definition
SPIRVConversion.h:74
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
mlir::populateVectorReductionToSPIRVDotProductPatterns
void populateVectorReductionToSPIRVDotProductPatterns(RewritePatternSet &patterns)
Appends patterns to convert vector reduction of the form:
Definition
VectorToSPIRV.cpp:1092
mlir::populateVectorToSPIRVPatterns
void populateVectorToSPIRVPatterns(const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
Appends to a pattern list additional patterns for translating Vector Ops to SPIR-V ops.
Definition
VectorToSPIRV.cpp:1069
Generated on
for MLIR by
1.14.0