#include "mlir/Conversion/SCFToGPU/SCFToGPUPass.h"
#include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/CommandLine.h"
namespace mlir {
#define GEN_PASS_DEF_CONVERTAFFINEFORTOGPU
#define GEN_PASS_DEF_CONVERTPARALLELLOOPTOGPU
#include "mlir/Conversion/Passes.h.inc"
}
usingnamespacemlir;
usingnamespacemlir::scf;
namespace {
struct ForLoopMapper : public impl::ConvertAffineForToGPUBase<ForLoopMapper> { … };
struct ParallelLoopToGpuPass
: public impl::ConvertParallelLoopToGpuBase<ParallelLoopToGpuPass> { … };
}
std::unique_ptr<InterfacePass<FunctionOpInterface>>
mlir::createAffineForToGPUPass(unsigned numBlockDims, unsigned numThreadDims) { … }
std::unique_ptr<InterfacePass<FunctionOpInterface>>
mlir::createAffineForToGPUPass() { … }
std::unique_ptr<Pass> mlir::createParallelLoopToGpuPass() { … }