Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fifield committed May 23, 2024
1 parent 28be311 commit b1bd486
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 117 deletions.
4 changes: 2 additions & 2 deletions python/compiler/aiecc/cl_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ def parse_args(args=None):
help="Generate xclbin",
)
parser.add_argument(
"--xclbin-input-name",
dest="xclbin_input_name",
"--xclbin-input",
dest="xclbin_input",
default=None,
help="Generate kernel into existing xclbin file",
)
Expand Down
6 changes: 3 additions & 3 deletions python/compiler/aiecc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,18 +589,18 @@ async def process_xclbin_gen(self):

# fmt: off
await self.do_call(task, ["bootgen", "-arch", "versal", "-image", self.prepend_tmp("design.bif"), "-o", self.prepend_tmp("design.pdi"), "-w"])
if opts.xclbin_input_name:
if opts.xclbin_input:
await self.do_call(task, ["xclbinutil",
"--dump-section", "AIE_PARTITION:JSON:" + self.prepend_tmp("aie_input_partition.json"),
"--force", "--input", opts.xclbin_input_name])
"--force", "--input", opts.xclbin_input])
with open(self.prepend_tmp("aie_input_partition.json")) as f:
input_partition = json.load(f)
with open(self.prepend_tmp("aie_partition.json")) as f:
new_partition = json.load(f)
input_partition["aie_partition"]["PDIs"].append(new_partition["aie_partition"]["PDIs"][0])
with open(self.prepend_tmp("aie_partition.json"), "w") as f:
json.dump(input_partition, f, indent=2)
flag = ['--input', opts.xclbin_input_name]
flag = ['--input', opts.xclbin_input]
else:
flag = ["--add-replace-section", "MEM_TOPOLOGY:JSON:" + self.prepend_tmp("mem_topology.json")]

Expand Down
71 changes: 0 additions & 71 deletions test/npu-xrt/add_one_two/CMakeLists.txt

This file was deleted.

40 changes: 0 additions & 40 deletions test/npu-xrt/add_one_two/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion test/npu-xrt/add_one_two/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// REQUIRES: ryzen_ai
//
// RUN: %python aiecc.py --xclbin-kernel-name=ADDONE --xclbin-kernel-id=0x901 --xclbin-instance-name=ADDONEINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-name=add_one.xclbin --npu-insts-name=insts.txt %S/aie1.mlir
// RUN: %python aiecc.py --xclbin-kernel-name=ADDTWO --xclbin-kernel-id=0x902 --xclbin-instance-name=ADDTWOINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-input-name=add_one.xclbin --xclbin-name=add_two.xclbin --npu-insts-name=insts.txt %S/aie2.mlir
// RUN: %python aiecc.py --xclbin-kernel-name=ADDTWO --xclbin-kernel-id=0x902 --xclbin-instance-name=ADDTWOINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-input=add_one.xclbin --xclbin-name=add_two.xclbin --npu-insts-name=insts.txt %S/aie2.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ -lboost_program_options -lboost_filesystem
// RUN: %run_on_npu ./test.exe -x add_two.xclbin -i insts.txt | FileCheck %s
// CHECK: PASS!
Expand Down

0 comments on commit b1bd486

Please sign in to comment.