Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tools/aiecc/aiecc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ static cl::opt<bool> noUnified(
cl::desc("Compile cores independently in separate processes (default)"),
cl::init(false), cl::cat(aieCompilerOptions));

static cl::opt<bool> bf16Emulation(
"bf16-emulation",
cl::desc("Emulate f32 vector arithmetic using bf16 operations in "
"convert-vector-to-aievec"),
cl::init(false), cl::cat(aieCompilerOptions));

// Backward compatibility flags (no-ops in C++ aiecc)
// These flags existed in Python aiecc.py but are not used in the core
// compilation flow. They are kept for backward compatibility so that
Expand Down Expand Up @@ -1345,7 +1351,8 @@ static LogicalResult runResourceAllocationPipeline(ModuleOp moduleOp,
lowerTarget == "aie2p") {
std::string vecPipeline =
"convert-vector-to-aievec{aie-target=" + lowerTarget +
" target-backend=llvmir}";
" target-backend=llvmir" +
(bf16Emulation ? " bf16-emulation=true" : "") + "}";
if (failed(parsePassPipeline(vecPipeline, pm))) {
llvm::errs() << "Error: Failed to parse convert-vector-to-aievec "
"pipeline\n";
Expand Down
Loading