9#ifndef AIE_TARGETS_AIETARGETS_H
10#define AIE_TARGETS_AIETARGETS_H
12#include "mlir/IR/BuiltinOps.h"
13#include "mlir/IR/Location.h"
14#include "mlir/IR/MLIRContext.h"
15#include "mlir/Support/LogicalResult.h"
17#include "llvm/ADT/DenseMap.h"
18#include "llvm/ADT/STLFunctionalExtras.h"
19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/raw_ostream.h"
50 std::optional<mlir::Location>
loc;
56 llvm::StringRef binaryName,
57 const std::vector<TxnLocEntry> &locmap);
60 llvm::raw_ostream &output,
61 llvm::StringRef deviceName =
"");
63 llvm::raw_ostream &output,
64 llvm::StringRef deviceName =
"");
66 llvm::raw_ostream &output,
67 llvm::StringRef deviceName =
"");
70 llvm::StringRef deviceName =
"");
72 llvm::raw_ostream &, llvm::StringRef);
90 llvm::function_ref<mlir::LogicalResult(
Config &)> encode);
95 std::array<llvm::DenseMap<mlir::Operation *, std::unique_ptr<Config>>, 2>
100 mlir::ModuleOp, std::vector<uint32_t> &, llvm::StringRef deviceName =
"",
101 llvm::StringRef sequenceName =
"",
102 std::vector<TxnLocEntry> *locmap =
nullptr,
bool foldDDRAddrOffset =
true,
110 llvm::raw_ostream &output,
111 bool foldDDRAddrOffset =
true,
112 bool emitDispatchShim =
false);
114 llvm::raw_ostream &output);
116 std::string &assembly,
117 llvm::StringRef outputPath =
"");
120 llvm::StringRef deviceName =
"",
121 llvm::StringRef sequenceName =
"",
122 std::vector<TxnLocEntry> *locmap =
nullptr);
126 mlir::ModuleOp module, llvm::raw_ostream &output,
int tileCol,
int tileRow,
127 llvm::StringRef deviceName =
"",
bool probe =
false,
128 llvm::function_ref<std::string(llvm::StringRef)> resolveLinkFile =
nullptr);
130 llvm::raw_ostream &output,
int tileCol,
132 llvm::StringRef deviceName =
"");
134AIELLVMLink(llvm::raw_ostream &output,
const std::vector<std::string> &Files,
135 bool DisableDITypeMap =
false,
bool NoVerify =
false,
136 bool Internalize =
false,
bool OnlyNeeded =
false,
137 bool PreserveAssemblyUseListOrder =
false,
bool Verbose =
false);
140 mlir::ModuleOp m, llvm::StringRef workDirPath, llvm::StringRef deviceName,
141 bool bigEndian =
false,
bool emitUnified =
false,
bool cdoDebug =
false,
142 bool aieSim =
false,
bool xaieDebug =
false,
bool enableCores =
true);
145 llvm::raw_ostream &output,
146 llvm::StringRef deviceName);
const Config * getOrEncode(mlir::Operation *device, bool teardown, llvm::function_ref< mlir::LogicalResult(Config &)> encode)
void emitNpuLocmapJSON(llvm::raw_ostream &output, llvm::StringRef deviceName, llvm::StringRef binaryName, const std::vector< TxnLocEntry > &locmap)
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 AIETranslateControlPacketsToUI32Vec(mlir::ModuleOp, std::vector< uint32_t > &, llvm::StringRef deviceName="", llvm::StringRef sequenceName="", std::vector< TxnLocEntry > *locmap=nullptr)
mlir::LogicalResult AIETranslateToTargetArch(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName)
mlir::LogicalResult AIETranslateNpuToBinary(mlir::ModuleOp, std::vector< uint32_t > &, llvm::StringRef deviceName="", llvm::StringRef sequenceName="", std::vector< TxnLocEntry > *locmap=nullptr, bool foldDDRAddrOffset=true, NpuConfigCache *configs=nullptr)
mlir::LogicalResult AIEFlowsToJSON(mlir::ModuleOp module, llvm::raw_ostream &output, llvm::StringRef deviceName="")
mlir::LogicalResult AIELLVMLink(llvm::raw_ostream &output, const 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 AIETranslateToBCF(mlir::ModuleOp module, llvm::raw_ostream &output, int tileCol, int tileRow, llvm::StringRef deviceName="")
mlir::LogicalResult AIETranslateNpuToCpp(mlir::ModuleOp module, llvm::raw_ostream &output, bool foldDDRAddrOffset=true, bool emitDispatchShim=false)
Emit a C++ builder that reconstructs the TXN stream at runtime.
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 AIETranslateToXAIEV2(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="", bool probe=false, llvm::function_ref< std::string(llvm::StringRef)> resolveLinkFile=nullptr)
std::vector< uint32_t > words
std::vector< TxnLocEntry > locmap
std::optional< uint64_t > address
std::string registerModule
std::optional< mlir::Location > loc