MLIR 22.0.0git
Transforms.h
Go to the documentation of this file.
1//===- Transforms.h - Shard Transforms --------------------------*- 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_DIALECT_SHARD_TRANSFORMS_TRANSFORMS_H
10#define MLIR_DIALECT_SHARD_TRANSFORMS_TRANSFORMS_H
11
14#include "mlir/IR/Value.h"
15#include "mlir/Support/LLVM.h"
16#include "llvm/ADT/ArrayRef.h"
17
18namespace mlir {
21class DialectRegistry;
23namespace shard {
24
26 RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection);
27void registerProcessMultiIndexOpLoweringDialects(DialectRegistry &registry);
28
30 RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection);
31void registerAllSliceOpLoweringDialects(DialectRegistry &registry);
32
34 RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection);
35void registerAllOpLoweringDialects(DialectRegistry &registry);
36
38createCollectiveProcessGroupSize(GridOp grid, ArrayRef<GridAxis> axes,
39 ImplicitLocOpBuilder &builder);
40
41// Get process linear index along the given grid axes.
43 ArrayRef<GridAxis> gridAxes,
44 ImplicitLocOpBuilder &builder);
45// Get process linear index from a multi-index along the given grid axes .
47createProcessLinearIndex(StringRef grid, ValueRange processInGroupMultiIndex,
48 ArrayRef<GridAxis> gridAxes,
49 ImplicitLocOpBuilder &builder);
50
51} // namespace shard
52} // namespace mlir
53
54#endif // MLIR_DIALECT_SHARD_TRANSFORMS_TRANSFORMS_H
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
ImplicitLocOpBuilder maintains a 'current location', allowing use of the create<> method without spec...
Definition Builders.h:630
This class represents a collection of SymbolTables.
void populateAllOpLoweringPatterns(RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection)
void registerAllSliceOpLoweringDialects(DialectRegistry &registry)
void populateAllSliceOpLoweringPatterns(RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection)
void populateProcessMultiIndexOpLoweringPatterns(RewritePatternSet &patterns, SymbolTableCollection &symbolTableCollection)
void registerAllOpLoweringDialects(DialectRegistry &registry)
TypedValue< IndexType > createProcessLinearIndex(StringRef grid, ArrayRef< GridAxis > gridAxes, ImplicitLocOpBuilder &builder)
TypedValue< IndexType > createCollectiveProcessGroupSize(GridOp grid, ArrayRef< GridAxis > axes, ImplicitLocOpBuilder &builder)
void registerProcessMultiIndexOpLoweringDialects(DialectRegistry &registry)
Include the generated interface declarations.
std::conditional_t< std::is_same_v< Ty, mlir::Type >, mlir::Value, detail::TypedValue< Ty > > TypedValue
If Ty is mlir::Type this will select Value instead of having a wrapper around it.
Definition Value.h:497
const FrozenRewritePatternSet & patterns