Skip to content

Commit

Permalink
Remove aie to ctrl pkt conversion from aie-translate
Browse files Browse the repository at this point in the history
  • Loading branch information
fifield committed Sep 12, 2024
1 parent 4f3bc02 commit fd66b80
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 425 deletions.
3 changes: 0 additions & 3 deletions include/aie-c/Translation.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ MLIR_CAPI_EXPORTED MlirLogicalResult
aieTranslateToCDODirect(MlirOperation moduleOp, MlirStringRef workDirPath,
bool bigEndian, bool emitUnified, bool cdoDebug,
bool aieSim, bool xaieDebug, bool enableCores);
MLIR_CAPI_EXPORTED MlirLogicalResult aieTranslateToCtrlpkt(
MlirOperation moduleOp, MlirStringRef outputFile, MlirStringRef workDirPath,
bool aieSim, bool xaieDebug, bool enableCores);
MLIR_CAPI_EXPORTED MlirOperation aieTranslateBinaryToTxn(MlirContext ctx,
MlirStringRef binary);

Expand Down
9 changes: 0 additions & 9 deletions include/aie/Targets/AIETargets.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ AIETranslateToCDODirect(mlir::ModuleOp m, llvm::StringRef workDirPath,
bool bigEndian = false, bool emitUnified = false,
bool cdoDebug = false, bool aieSim = false,
bool xaieDebug = false, bool enableCores = true);
mlir::LogicalResult
AIETranslateToControlPackets(mlir::ModuleOp m, llvm::raw_ostream &output,
llvm::StringRef workDirPath,
bool outputBinary = false, bool aieSim = false,
bool xaieDebug = false, bool enableCores = true);

#ifdef AIE_ENABLE_AIRBIN
mlir::LogicalResult AIETranslateToAirbin(mlir::ModuleOp module,
Expand All @@ -79,10 +74,6 @@ mlir::LogicalResult AIETranslateToAirbin(mlir::ModuleOp module,
mlir::LogicalResult AIETranslateToTargetArch(mlir::ModuleOp module,
llvm::raw_ostream &output);

std::optional<mlir::ModuleOp>
AIETranslateBinaryToCtrlpkt(mlir::MLIRContext *ctx,
std::vector<uint8_t> &binary);

} // namespace AIE

namespace aievec {
Expand Down
33 changes: 0 additions & 33 deletions lib/CAPI/Translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,39 +84,6 @@ MlirLogicalResult aieTranslateToCDODirect(MlirOperation moduleOp,
return wrap(status);
}

MlirLogicalResult aieTranslateToCtrlpkt(MlirOperation moduleOp,
MlirStringRef outputFile,
MlirStringRef workDirPath, bool aieSim,
bool xaieDebug, bool enableCores) {
ModuleOp mod = llvm::cast<ModuleOp>(unwrap(moduleOp));
bool outputBinary = false;

std::string errorMessage;
auto output = openOutputFile(StringRef(outputFile.data, outputFile.length),
&errorMessage);
if (!output) {
llvm::errs() << errorMessage << "\n";
return wrap(failure());
}

auto status = AIETranslateToControlPackets(
mod, output->os(), llvm::StringRef(workDirPath.data, workDirPath.length),
outputBinary, aieSim, xaieDebug, enableCores);

std::vector<std::string> diagnostics;
ScopedDiagnosticHandler handler(mod.getContext(), [&](Diagnostic &d) {
llvm::raw_string_ostream(diagnostics.emplace_back())
<< d.getLocation() << ": " << d;
});

if (failed(status))
for (const auto &diagnostic : diagnostics)
std::cerr << diagnostic << "\n";
else
output->keep();
return wrap(status);
}

MlirOperation aieTranslateBinaryToTxn(MlirContext ctx, MlirStringRef binary) {
std::vector<uint8_t> binaryData(binary.data, binary.data + binary.length);
auto mod = convertTransactionBinaryToMLIR(unwrap(ctx), binaryData);
Expand Down
Loading

0 comments on commit fd66b80

Please sign in to comment.