Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back routine when bank-aware allocation fails #1625

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2bbcab6
Update alloc scheme flags
abisca May 7, 2024
fd0c7d3
Solve conflicts
abisca May 10, 2024
820b90c
Merge branch 'alloc-flags' of https://github.com/Xilinx/mlir-aie into…
pvasireddy-amd Jun 18, 2024
7f45c9f
Add alloc scheme to run command
pvasireddy-amd Jun 18, 2024
4aeb180
Add alloc-scheme to run command
pvasireddy-amd Jun 19, 2024
d95e1c5
Add getNumBanks() to TargetModel
pvasireddy-amd Jun 26, 2024
b0a128f
Updated --alloc-scheme in run command
pvasireddy-amd Jun 26, 2024
5a1d14d
Placement Errors
pvasireddy-amd Jul 3, 2024
2c8d17d
Failing check
pvasireddy-amd Jul 3, 2024
a8677c4
Add alloc-scheme to run command
pvasireddy-amd Jul 3, 2024
cecdf76
Failed check
pvasireddy-amd Jul 3, 2024
d5c919a
Merge remote-tracking branch 'main/main' into alloc-flags
pvasireddy-amd Jul 3, 2024
613b845
Fallback routine for bank-aware allocation failure
pvasireddy-amd Jul 15, 2024
fe14350
Fall back routine
pvasireddy-amd Jul 17, 2024
8d5eeb0
Fallback routine
pvasireddy-amd Jul 17, 2024
2347789
Fallback routine
pvasireddy-amd Jul 17, 2024
a5a89eb
Merge remote-tracking branch 'main/main' into alloc-flags
pvasireddy-amd Jul 17, 2024
eb76073
Fallback routine
pvasireddy-amd Jul 17, 2024
1ee9a2a
Code format
pvasireddy-amd Jul 17, 2024
181314d
Code formatting
pvasireddy-amd Jul 17, 2024
6201c29
Check message
pvasireddy-amd Jul 17, 2024
7d26945
Check message
pvasireddy-amd Jul 17, 2024
71ba614
Check Message
pvasireddy-amd Jul 17, 2024
383b6db
Check Message
pvasireddy-amd Jul 17, 2024
33ac05d
Allocation flags
pvasireddy-amd Jul 17, 2024
8fb7e05
Allocation Flags
pvasireddy-amd Jul 17, 2024
b5eef3a
Check Message
pvasireddy-amd Jul 17, 2024
8f578fd
Check Message
pvasireddy-amd Jul 17, 2024
6d2ea22
Default message
pvasireddy-amd Jul 18, 2024
5b9c742
FileCheck
pvasireddy-amd Jul 22, 2024
f1b967a
FileCheck
pvasireddy-amd Jul 22, 2024
552cdfe
Merge branch 'main' of https://github.com/Xilinx/mlir-aie into alloc-…
pvasireddy-amd Jul 23, 2024
47de60c
CI error
pvasireddy-amd Jul 23, 2024
e042b38
CI error
pvasireddy-amd Jul 23, 2024
78466e7
Merge branch 'alloc-flags' of https://github.com/Xilinx/mlir-aie into…
pvasireddy-amd Jul 23, 2024
3fcdbde
Revert changes
pvasireddy-amd Jul 23, 2024
ca9e514
Message change
pvasireddy-amd Jul 24, 2024
4384c9b
Adjusting bankIndex
pvasireddy-amd Jul 25, 2024
a53a7a5
Merge latest changes
pvasireddy-amd Sep 16, 2024
978f55e
Merge latest changes
pvasireddy-amd Sep 16, 2024
7612c39
Merge branch 'main' into alloc-flags
pvasireddy-amd Sep 16, 2024
bd5a81b
Formatting main.py
pvasireddy-amd Sep 16, 2024
22c5533
Merge branch 'alloc-flags' of https://github.com/Xilinx/mlir-aie into…
pvasireddy-amd Sep 16, 2024
fc6dca2
Updated check messages
pvasireddy-amd Sep 16, 2024
4c34c28
Update flags
pvasireddy-amd Sep 19, 2024
08de1fc
Fall back Error Test case
pvasireddy-amd Sep 19, 2024
6bdd30f
Reduced CHECK message
pvasireddy-amd Sep 19, 2024
1b0a348
Merge branch 'main' into alloc-flags
pvasireddy-amd Sep 19, 2024
84b94ac
Updating names
pvasireddy-amd Sep 19, 2024
5202302
Unit tests
pvasireddy-amd Sep 19, 2024
9989149
Error check messgae is not found, so added alloc-scheme to see if it …
pvasireddy-amd Sep 19, 2024
ad7a10b
Error with check message, so added alloc-scheme flag
pvasireddy-amd Sep 19, 2024
55c7220
Revert "Error with check message, so added alloc-scheme flag"
pvasireddy-amd Sep 19, 2024
34a3e0f
Revert "Error check messgae is not found, so added alloc-scheme to se…
pvasireddy-amd Sep 19, 2024
fc49e0b
Removing CHECK messages with address to check if that is the reason f…
pvasireddy-amd Sep 19, 2024
04dcd7f
Messages
pvasireddy-amd Sep 19, 2024
e155c24
Revert "Messages"
pvasireddy-amd Sep 19, 2024
33c659a
Messages
pvasireddy-amd Sep 19, 2024
8b79b43
Merge branch 'main' into alloc-flags
pvasireddy-amd Sep 19, 2024
5420b86
Using sequential allocation
pvasireddy-amd Sep 19, 2024
d853109
Merge branch 'alloc-flags' of https://github.com/Xilinx/mlir-aie into…
pvasireddy-amd Sep 19, 2024
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
3 changes: 3 additions & 0 deletions include/aie-c/TargetModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ aieTargetModelGetNumMemTileRows(AieTargetModel targetModel);
MLIR_CAPI_EXPORTED uint32_t
aieTargetModelGetMemTileSize(AieTargetModel targetModel);

MLIR_CAPI_EXPORTED uint32_t
aieTargetModelGetNumBanks(AieTargetModel targetModel, int col, int row);

/// Returns true if this is an NPU target model.
MLIR_CAPI_EXPORTED bool aieTargetModelIsNPU(AieTargetModel targetModel);

Expand Down
7 changes: 7 additions & 0 deletions include/aie/Dialect/AIE/IR/AIETargetModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ class AIETargetModel {
virtual uint32_t getNumMemTileRows() const = 0;
/// Return the size (in bytes) of a MemTile.
virtual uint32_t getMemTileSize() const = 0;
/// Return the number of memory banks of a given tile.
virtual uint32_t getNumBanks(int col, int row) const = 0;
/// Return the number of destinations of connections inside a switchbox. These
/// are the targets of connect operations in the switchbox.
virtual uint32_t getNumDestSwitchboxConnections(int col, int row,
Expand Down Expand Up @@ -259,6 +261,7 @@ class AIE1TargetModel : public AIETargetModel {
uint32_t getNumBDs(int col, int row) const override { return 16; }
uint32_t getNumMemTileRows() const override { return 0; }
uint32_t getMemTileSize() const override { return 0; }
uint32_t getNumBanks(int col, int row) const override { return 4; }

uint32_t getNumDestSwitchboxConnections(int col, int row,
WireBundle bundle) const override;
Expand Down Expand Up @@ -320,6 +323,10 @@ class AIE2TargetModel : public AIETargetModel {

uint32_t getMemTileSize() const override { return 0x00080000; }

uint32_t getNumBanks(int col, int row) const override {
return isMemTile(col, row) ? 8 : 4;
}

uint32_t getNumDestSwitchboxConnections(int col, int row,
WireBundle bundle) const override;
uint32_t getNumSourceSwitchboxConnections(int col, int row,
Expand Down
4 changes: 2 additions & 2 deletions include/aie/Dialect/AIE/Transforms/AIEPasses.td
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def AIEAssignBufferAddresses : Pass<"aie-assign-buffer-addresses", "DeviceOp"> {
let constructor = "xilinx::AIE::createAIEAssignBufferAddressesPass()";

let options = [
Option<"clBasicAlloc", "basic-alloc", "bool", /*default=*/"false",
"Flag to enable the basic sequential allocation scheme (not bank-aware).">
Option<"clAllocScheme", "alloc-scheme", "std::string", /*default=*/"",
"Choose allocation scheme; possibilities: basic-sequential, bank-aware. By default, bank-aware is selected and if it fails, will fall back to basic-sequential scheme.">,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be made to fit into ~80-100 columns?

];
}

Expand Down
5 changes: 5 additions & 0 deletions lib/CAPI/TargetModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ uint32_t aieTargetModelGetMemTileSize(AieTargetModel targetModel) {
return unwrap(targetModel).getMemTileSize();
}

uint32_t aieTargetModelGetNumBanks(AieTargetModel targetModel, int col,
int row) {
return unwrap(targetModel).getNumBanks(col, row);
}

bool aieTargetModelIsNPU(AieTargetModel targetModel) {
return unwrap(targetModel).isNPU();
}
Expand Down
135 changes: 105 additions & 30 deletions lib/Dialect/AIE/Transforms/AIEAssignBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ LogicalResult checkAndPrintOverflow(TileOp tile, int address,
int maxDataMemorySize, int stacksize,
SmallVector<BufferOp, 4> buffers) {
if (address > maxDataMemorySize) {
InFlightDiagnostic error =
tile.emitOpError("allocated buffers exceeded available memory\n");
InFlightDiagnostic error = tile.emitOpError(
"allocated buffers exceeded available memory: Sequential\n");
auto &note = error.attachNote() << "MemoryMap:\n";
auto printbuffer = [&](StringRef name, int address, int size) {
note << "\t" << name << " \t"
Expand All @@ -53,7 +53,7 @@ LogicalResult checkAndPrintOverflow(TileOp tile, int address,
return success();
}

LogicalResult basicAllocation(TileOp &tile) {
LogicalResult basicAllocation(TileOp tile) {
auto device = tile->getParentOfType<AIE::DeviceOp>();
if (!device)
return failure();
Expand Down Expand Up @@ -113,14 +113,6 @@ typedef struct BankLimits {
int64_t endAddr;
} BankLimits;

// TODO: add to target model
int getNumBanks(TileOp tile) {
if (tile.isMemTile())
return 1;
else
return 4;
}

// Function that given a number of banks and their size, computes
// the start and end addresses for each bank and fills in the entry
// in the bankLimits vector.
Expand Down Expand Up @@ -195,33 +187,84 @@ bool checkAndAddBufferWithMemBank(BufferOp buffer, int numBanks,
return false;
}

// Prints the memory map across banks
void printMemMap(TileOp tile, SmallVector<BufferOp, 4> allocatedBuffers,
SmallVector<BufferOp, 4> preAllocatedBuffers, int numBanks,
std::vector<BankLimits> &bankLimits, int stacksize) {
InFlightDiagnostic error =
tile.emitOpError("All requested buffers doesn't fit in the available "
"memory: Bank aware\n");
pvasireddy-amd marked this conversation as resolved.
Show resolved Hide resolved
auto &note = error.attachNote()
<< "Current configuration of buffers in bank(s) : ";
note << "MemoryMap:\n";
auto printbuffer = [&](StringRef name, int address, int size) {
note << "\t"
<< "\t" << name << " \t"
<< ": 0x" << llvm::utohexstr(address) << "-0x"
<< llvm::utohexstr(address + size - 1) << " \t(" << size
<< " bytes)\n";
};
for (int i = 0; i < numBanks; i++) {
if (i == 0) {
if (stacksize > 0)
printbuffer("(stack)", 0, stacksize);
else
note << "(no stack allocated)\n";
}
note << "\t"
<< "bank : " << i << "\t"
<< "0x" << llvm::utohexstr(bankLimits[i].startAddr) << "-0x"
<< llvm::utohexstr(bankLimits[i].endAddr - 1) << "\n";
for (auto buffer : preAllocatedBuffers) {
auto addr = buffer.getAddress().value();
auto mem_bank = buffer.getMemBank().value();
if (mem_bank == i)
printbuffer(buffer.name(), addr, buffer.getAllocationSize());
}
for (auto buffer : allocatedBuffers) {
auto addr = buffer.getAddress().value();
auto mem_bank = buffer.getMemBank().value();
if (mem_bank == i)
printbuffer(buffer.name(), addr, buffer.getAllocationSize());
}
}
}

// Function that given a buffer will iterate over all the memory banks
// starting from the given index to try and find a bank with enough
// space. If it does, it will set the buffer's address and mem_bank
// attributes and update the nextAddrInBanks vector.
// If it does not find one with enough space, it will allocate the
// buffer in the last checked bank (this will be picked up during
// overflow error checking). Finally, the function returns the index
// of the next bank to search (which should be given to subsequent
// If it does not find one with enough space, it will throw an error.
// Finally, the function returns a pass or a fail.
// The index of the next bank to search (which should be given to subsequent
// calls of this function to ensure a round-robin allocation scheme
// over the available banks).
int setBufferAddress(BufferOp buffer, int numBanks, int startBankIndex,
std::vector<int64_t> &nextAddrInBanks,
std::vector<BankLimits> &bankLimits) {
int bankIndex = startBankIndex;
bool setBufferAddress(BufferOp buffer, int numBanks, int &bankIndex,
std::vector<int64_t> &nextAddrInBanks,
std::vector<BankLimits> &bankLimits) {
bool allocated = false;
for (int i = 0; i < numBanks; i++) {
int64_t startAddr = nextAddrInBanks[bankIndex];
int64_t endAddr = startAddr + buffer.getAllocationSize();
if (endAddr <= bankLimits[bankIndex].endAddr || i == numBanks - 1) {
if (endAddr <= bankLimits[bankIndex].endAddr) {
buffer.setMemBank(bankIndex);
setAndUpdateAddressInBank(buffer, startAddr, endAddr, nextAddrInBanks);
allocated = true;
bankIndex++;
break;
}
// Move to the next bank
bankIndex++;
bankIndex %= numBanks;
}
// If no bank has enough space, throws error
if (!allocated) {
buffer.emitError("Failed to allocate buffer: ")
<< buffer.name() << " with size: " << buffer.getAllocationSize()
<< " bytes.";
return false;
}
bankIndex %= numBanks;
return bankIndex;
return true;
}

LogicalResult checkAndPrintOverflow(TileOp tile, int numBanks, int stacksize,
Expand All @@ -237,8 +280,8 @@ LogicalResult checkAndPrintOverflow(TileOp tile, int numBanks, int stacksize,
}
}
if (foundOverflow) {
InFlightDiagnostic error =
tile.emitOpError("allocated buffers exceeded available memory\n");
InFlightDiagnostic error = tile.emitOpError(
"allocated buffers exceeded available memory: Bank aware\n");
auto &note = error.attachNote() << "Error in bank(s) : ";
for (auto bank : overflow_banks)
note << bank << " ";
Expand Down Expand Up @@ -274,6 +317,14 @@ LogicalResult checkAndPrintOverflow(TileOp tile, int numBanks, int stacksize,
return success();
}

// Function to deallocate attributes of buffers in case of a failure
void deAllocationBuffers(SmallVector<BufferOp, 4> &buffers) {
for (auto buffer : buffers) {
buffer->removeAttr("address");
buffer->removeAttr("mem_bank");
}
}

LogicalResult simpleBankAwareAllocation(TileOp tile) {
auto device = tile->getParentOfType<AIE::DeviceOp>();
if (!device)
Expand All @@ -294,7 +345,7 @@ LogicalResult simpleBankAwareAllocation(TileOp tile) {
else
maxDataMemorySize = targetModel.getLocalMemorySize();

int numBanks = getNumBanks(tile);
int numBanks = targetModel.getNumBanks(tile.getCol(), tile.getRow());
int bankSize = maxDataMemorySize / numBanks;

// Address range owned by the MemTile is 0x80000.
Expand All @@ -311,6 +362,7 @@ LogicalResult simpleBankAwareAllocation(TileOp tile) {
fillBankLimits(numBanks, bankSize, bankLimits);

SmallVector<BufferOp, 4> buffersToAlloc;
SmallVector<BufferOp, 4> preAllocatedBuffers;
SmallVector<BufferOp, 4> allBuffers;
// Collect all the buffers for this tile.
device.walk<WalkOrder::PreOrder>([&](BufferOp buffer) {
Expand All @@ -330,6 +382,8 @@ LogicalResult simpleBankAwareAllocation(TileOp tile) {
nextAddrInBanks, bankLimits);
if (!has_addr && !has_bank)
buffersToAlloc.push_back(buffer);
else
preAllocatedBuffers.push_back(buffer);
}
}

Expand All @@ -340,10 +394,24 @@ LogicalResult simpleBankAwareAllocation(TileOp tile) {
});

// Set addresses for remaining buffers.
SmallVector<BufferOp, 4> allocatedBuffers;
int bankIndex = 0;
for (auto buffer : buffersToAlloc)
bankIndex = setBufferAddress(buffer, numBanks, bankIndex, nextAddrInBanks,
bankLimits);
for (auto buffer : buffersToAlloc) {
// If the buffer doesn't fit in any of the bank space then
// it prints the current memory map of the banks,
// deallocates all the buffers, and
// returns a failure.
if (!setBufferAddress(buffer, numBanks, bankIndex, nextAddrInBanks,
bankLimits)) {

printMemMap(tile, allocatedBuffers, preAllocatedBuffers, numBanks,
bankLimits, stacksize);
deAllocationBuffers(allocatedBuffers);
return failure();
} else {
allocatedBuffers.push_back(buffer);
}
}

// Sort by smallest address before printing memory map.
std::sort(allBuffers.begin(), allBuffers.end(), [](BufferOp a, BufferOp b) {
Expand Down Expand Up @@ -379,16 +447,23 @@ struct AIEAssignBufferAddressesPass
});

// Select allocation scheme
if (clBasicAlloc) {
if (clAllocScheme == "basic-sequential") {
for (auto tile : device.getOps<TileOp>()) {
if (auto res = basicAllocation(tile); res.failed())
return signalPassFailure();
}
} else {
} else if (clAllocScheme == "bank-aware") {
for (auto tile : device.getOps<TileOp>()) {
if (auto res = simpleBankAwareAllocation(tile); res.failed())
return signalPassFailure();
}
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to warn or error here if clAllocScheme was given by user but unrecognized

for (auto tile : device.getOps<TileOp>()) {
if (auto res = simpleBankAwareAllocation(tile); res.failed()) {
if (auto res2 = basicAllocation(tile); res2.failed())
return signalPassFailure();
}
}
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Targets/AIEVecToCpp/TranslateAIEVecToCpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3444,4 +3444,4 @@ LogicalResult aievec::translateAIEVecToCpp(Operation *op, bool aie2,
raw_ostream &os) {
CppEmitter emitter(os, false, aie2);
return emitter.emitOperation(*op, /*trailingSemicolon=*/false);
}
}
1 change: 0 additions & 1 deletion programming_examples/ml/bottleneck/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ build/conv2dk1_skip.o: conv2dk1_skip.cc

build/final.xclbin: build/${mlirFileName}.mlir build/conv2dk1.o build/conv2dk3.o build/conv2dk1_skip.o
cd build && aiecc.py -v --aie-generate-cdo --aie-generate-npu --no-compile-host \
--basic-alloc-scheme \
--xclbin-name=${@F} --npu-insts-name=insts.txt ${<F}

clean:
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/ml/resnet/layers_conv2_x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build/conv2dk1_skip.o: conv2dk1_skip.cc
xchesscc -d ${CHESSCC2_FLAGS} -DUINT8_ACT -c $< -o $@

build/final.xclbin: build/${mlirFileName}.mlir build/conv2dk1_i8.o build/conv2dk1_skip_init.o build/conv2dk3.o build/conv2dk1_skip.o build/conv2dk1_ui8.o
cd build && aiecc.py --basic-alloc-scheme --aie-generate-cdo --aie-generate-npu --no-compile-host \
cd build && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host \
--xclbin-name=${@F} --npu-insts-name=insts.txt ${<F}
clean:
rm -rf build log
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/vision/color_detect/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build/aie2_lineBased_8b_${COLORDETECT_WIDTH}.mlir: ${srcdir}/aie2_colorDetect.py

build/final_${COLORDETECT_WIDTH}.xclbin: build/aie2_lineBased_8b_${COLORDETECT_WIDTH}.mlir build/rgba2hue.cc.o build/threshold.cc.o build/combined_bitwiseOR_gray2rgba_bitwiseAND.a
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --basic-alloc-scheme \
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential \
--xclbin-name=${@F} --npu-insts-name=insts.txt $(<:%=../%)

${targetname}.exe: ${srcdir}/test.cpp
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/vision/color_threshold/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build/aie2_${COLORTHRESHOLD_WIDTH}.mlir: ${srcdir}/aie2_colorThreshold.py

build/final_${COLORTHRESHOLD_WIDTH}.xclbin: build/aie2_${COLORTHRESHOLD_WIDTH}.mlir build/threshold.cc.o
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --basic-alloc-scheme \
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential \
--xclbin-name=${@F} --npu-insts-name=insts.txt $(<:%=../%)

${targetname}.exe: ${srcdir}/test.cpp
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/vision/edge_detect/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build/aie2_lineBased_8b_${EDGEDETECT_WIDTH}.mlir: ${srcdir}/aie2_edgeDetect.py

build/final_${EDGEDETECT_WIDTH}.xclbin: build/aie2_lineBased_8b_${EDGEDETECT_WIDTH}.mlir build/rgba2gray.cc.o build/gray2rgba.cc.o build/filter2d.cc.o build/threshold.cc.o build/addWeighted.cc.o build/combined_gray2rgba_addWeighted.a
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --basic-alloc-scheme \
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential \
--xclbin-name=${@F} --npu-insts-name=insts.txt $(<:%=../%)

${targetname}.exe: ${srcdir}/test.cpp
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/vision/vision_passthrough/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build/passThrough.cc.o: passThrough.cc

build/final_${PASSTHROUGH_WIDTH}.xclbin: build/aie2_lineBased_8b_${PASSTHROUGH_WIDTH}.mlir build/passThrough.cc.o
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --basic-alloc-scheme \
cd ${@D} && aiecc.py --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential \
--xclbin-name=${@F} --npu-insts-name=insts.txt $(<:%=../%)

${targetname}.exe: ${srcdir}/test.cpp
Expand Down
9 changes: 4 additions & 5 deletions python/compiler/aiecc/cl_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ def parse_args(args=None):
help="Disable linking of AIE code",
)
parser.add_argument(
"--basic-alloc-scheme",
dest="basic_alloc_scheme",
default=False,
action="store_true",
help="Use basic memory allocation scheme for AIE buffer address assignment",
"--alloc-scheme",
dest="alloc_scheme",
default=None,
help="Choose allocation scheme for AIE buffer address assignment; possibilities: basic-sequential, bank-aware. By default, bank-aware is tried followed by basic-sequential if it fails.",
)
parser.add_argument(
"--aie-generate-airbin",
Expand Down
Loading
Loading