Files
clang-p2996/mlir/lib/Conversion/PassDetail.h
Christopher Bate 1ca772ed95 [MLIR][GPU] Add NvGpu mma.sync path to the VectorToGPU pass
This changes adds the option to lower to NvGpu dialect ops during the
VectorToGPU convsersion pass. Because this transformation reuses
existing VectorToGPU logic, a seperate VectorToNvGpu conversion pass is
not created. The option `use-nvgpu` is added to the VectorToGPU pass.
When this is true, the pass will attempt to convert slices rooted at
`vector.contract` operations into `nvgpu.mma.sync` ops, and
`vector.transfer_read` ops are converted to either `nvgpu.ldmatrix` or
one or more `vector.load` operations.  The specific data loaded will
depend on the thread id within a subgroup (warp). These index
calculations depend on data type and shape of the MMA op
according to the downstream PTX specification. The code for supporting
these details is separated into `NvGpuSupport.cpp|h`.

Differential Revision: https://reviews.llvm.org/D122940
2022-05-20 09:42:55 -06:00

116 lines
2.1 KiB
C++

//===- PassDetail.h - Conversion Pass class details -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef CONVERSION_PASSDETAIL_H_
#define CONVERSION_PASSDETAIL_H_
#include "mlir/Pass/Pass.h"
#include "mlir/Conversion/GPUToROCDL/Runtimes.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/FunctionInterfaces.h"
namespace mlir {
class AffineDialect;
// Forward declaration from Dialect.h
template <typename ConcreteDialect>
void registerDialect(DialectRegistry &registry);
namespace acc {
class OpenACCDialect;
} // namespace acc
namespace arith {
class ArithmeticDialect;
} // namespace arith
namespace cf {
class ControlFlowDialect;
} // namespace cf
namespace complex {
class ComplexDialect;
} // namespace complex
namespace gpu {
class GPUDialect;
class GPUModuleOp;
} // namespace gpu
namespace func {
class FuncDialect;
} // namespace func
namespace linalg {
class LinalgDialect;
} // namespace linalg
namespace LLVM {
class LLVMDialect;
} // namespace LLVM
namespace nvgpu {
class NVGPUDialect;
}
namespace NVVM {
class NVVMDialect;
} // namespace NVVM
namespace math {
class MathDialect;
} // namespace math
namespace memref {
class MemRefDialect;
} // namespace memref
namespace omp {
class OpenMPDialect;
} // namespace omp
namespace pdl_interp {
class PDLInterpDialect;
} // namespace pdl_interp
namespace ROCDL {
class ROCDLDialect;
} // namespace ROCDL
namespace scf {
class SCFDialect;
} // namespace scf
namespace spirv {
class SPIRVDialect;
} // namespace spirv
namespace tensor {
class TensorDialect;
} // namespace tensor
namespace tosa {
class TosaDialect;
} // namespace tosa
namespace vector {
class VectorDialect;
} // namespace vector
namespace arm_neon {
class ArmNeonDialect;
} // namespace arm_neon
#define GEN_PASS_CLASSES
#include "mlir/Conversion/Passes.h.inc"
} // namespace mlir
#endif // CONVERSION_PASSDETAIL_H_