MLIR-AIE
AIETargets.h
Go to the documentation of this file.
1//===- AIETargets.h ---------------------------------------------*- C++ -*-===//
2//
3// This file is licensed 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 AIE_TARGETS_AIETARGETS_H
10#define AIE_TARGETS_AIETARGETS_H
11
12#include "mlir/IR/BuiltinOps.h"
13#include "mlir/IR/MLIRContext.h"
14#include "mlir/Support/LogicalResult.h"
15
16#include "llvm/Support/raw_ostream.h"
17
18#include <vector>
19
20namespace xilinx {
21namespace AIE {
22
23mlir::LogicalResult AIETranslateToXAIEV2(mlir::ModuleOp module,
24 llvm::raw_ostream &output,
25 llvm::StringRef deviceName = "");
26mlir::LogicalResult AIETranslateToHSA(mlir::ModuleOp module,
27 llvm::raw_ostream &output,
28 llvm::StringRef deviceName = "");
29mlir::LogicalResult AIEFlowsToJSON(mlir::ModuleOp module,
30 llvm::raw_ostream &output,
31 llvm::StringRef deviceName = "");
32mlir::LogicalResult ADFGenerateCPPGraph(mlir::ModuleOp module,
33 llvm::raw_ostream &output);
34mlir::LogicalResult AIETranslateSCSimConfig(mlir::ModuleOp module,
35 llvm::raw_ostream &output,
36 llvm::StringRef deviceName = "");
37mlir::LogicalResult AIETranslateShimSolution(mlir::ModuleOp module,
38 llvm::raw_ostream &,
39 llvm::StringRef deviceName = "");
40mlir::LogicalResult AIETranslateGraphXPE(mlir::ModuleOp module,
41 llvm::raw_ostream &, llvm::StringRef);
42mlir::LogicalResult AIETranslateNpuToBinary(mlir::ModuleOp,
43 std::vector<uint32_t> &,
44 llvm::StringRef deviceName = "",
45 llvm::StringRef sequenceName = "");
46mlir::LogicalResult AIETranslateToUcDma(mlir::ModuleOp module,
47 llvm::raw_ostream &output);
48mlir::LogicalResult AIETranslateToUcDma(mlir::ModuleOp, std::string &assembly);
49mlir::LogicalResult
50AIETranslateControlPacketsToUI32Vec(mlir::ModuleOp, std::vector<uint32_t> &,
51 llvm::StringRef deviceName = "",
52 llvm::StringRef sequenceName = "");
53mlir::LogicalResult AIETranslateToLdScript(mlir::ModuleOp module,
54 llvm::raw_ostream &output,
55 int tileCol, int tileRow,
56 llvm::StringRef deviceName = "");
57mlir::LogicalResult AIETranslateToBCF(mlir::ModuleOp module,
58 llvm::raw_ostream &output, int tileCol,
59 int tileRow,
60 llvm::StringRef deviceName = "");
61mlir::LogicalResult
62AIELLVMLink(llvm::raw_ostream &output, std::vector<std::string> Files,
63 bool DisableDITypeMap = false, bool NoVerify = false,
64 bool Internalize = false, bool OnlyNeeded = false,
65 bool PreserveAssemblyUseListOrder = false, bool Verbose = false);
66
67mlir::LogicalResult AIETranslateToCDODirect(
68 mlir::ModuleOp m, llvm::StringRef workDirPath, llvm::StringRef deviceName,
69 bool bigEndian = false, bool emitUnified = false, bool cdoDebug = false,
70 bool aieSim = false, bool xaieDebug = false, bool enableCores = true);
71
72mlir::LogicalResult AIETranslateToTargetArch(mlir::ModuleOp module,
73 llvm::raw_ostream &output,
74 llvm::StringRef deviceName);
75
76} // namespace AIE
77
78namespace aievec {
79
80/// Translates the AIE vector dialect MLIR to C++ code.
81mlir::LogicalResult translateAIEVecToCpp(mlir::Operation *op, bool aie2,
82 mlir::raw_ostream &os);
83
84} // namespace aievec
85} // namespace xilinx
86
87#endif
mlir::LogicalResult AIETranslateControlPacketsToUI32Vec(mlir::ModuleOp, std::vector< uint32_t > &, llvm::StringRef deviceName="", llvm::StringRef sequenceName="")
mlir::LogicalResult AIETranslateToUcDma(mlir::ModuleOp module, llvm::raw_ostream &output)
mlir::LogicalResult AIETranslateSCSimConfig(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateToCDODirect(mlir::ModuleOp m, llvm::StringRef workDirPath, llvm::StringRef deviceName, bool bigEndian=false, bool emitUnified=false, bool cdoDebug=false, bool aieSim=false, bool xaieDebug=false, bool enableCores=true)
mlir::LogicalResult AIELLVMLink(llvm::raw_ostream &output, std::vector< std::string > Files, bool DisableDITypeMap=false, bool NoVerify=false, bool Internalize=false, bool OnlyNeeded=false, bool PreserveAssemblyUseListOrder=false, bool Verbose=false)
mlir::LogicalResult ADFGenerateCPPGraph(mlir::ModuleOp module, llvm::raw_ostream &output)
mlir::LogicalResult AIETranslateToTargetArch(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName)
mlir::LogicalResult AIETranslateToLdScript(mlir::ModuleOp module, llvm::raw_ostream &output, int tileCol, int tileRow, llvm::StringRef deviceName="")
mlir::LogicalResult AIEFlowsToJSON(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateToBCF(mlir::ModuleOp module, llvm::raw_ostream &output, int tileCol, int tileRow, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateShimSolution(mlir::ModuleOp module, llvm::raw_ostream &, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateGraphXPE(mlir::ModuleOp module, llvm::raw_ostream &, llvm::StringRef)
mlir::LogicalResult AIETranslateNpuToBinary(mlir::ModuleOp, std::vector< uint32_t > &, llvm::StringRef deviceName="", llvm::StringRef sequenceName="")
mlir::LogicalResult AIETranslateToHSA(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateToXAIEV2(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName="")
mlir::LogicalResult translateAIEVecToCpp(mlir::Operation *op, bool aie2, mlir::raw_ostream &os)
Translates the AIE vector dialect MLIR to C++ code.