From 4c572d34ebd18bfd109e0c130cfb1d7a70d79c4b Mon Sep 17 00:00:00 2001 From: "Andrea Oggioni (aupcloud)" <24810621+etabeta1@users.noreply.github.com> Date: Sat, 23 May 2026 13:33:20 +0000 Subject: [PATCH 1/3] Remove usages of deprecated `SequentialPlacer` `SequentialPlacer` was deprecated and then removed from IRON --- ivoted/aie2.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ivoted/aie2.py b/ivoted/aie2.py index 69edc86..31f570c 100644 --- a/ivoted/aie2.py +++ b/ivoted/aie2.py @@ -10,7 +10,6 @@ import sys from aie.iron import Kernel, ObjectFifo, Program, Runtime, Worker -from aie.iron.placers import SequentialPlacer from aie.iron.device import NPU1Col1, NPU2 from aie.iron.controlflow import range_ @@ -102,7 +101,7 @@ def core_fn(of_in, of_factor, of_out, scale_scalar): my_program = Program(dev, rt) # Place components (assign them resources on the device) and generate an MLIR module - return my_program.resolve_program(SequentialPlacer()) + return my_program.resolve_program() # Parse module arguments From 3145abfadfc81f3474fa4e78d503fc271844f8fa Mon Sep 17 00:00:00 2001 From: "Andrea Oggioni (aupcloud)" <24810621+etabeta1@users.noreply.github.com> Date: Sat, 23 May 2026 13:52:39 +0000 Subject: [PATCH 2/3] Ensure MLIR schedule rebuilds after it failed on previous `make` call --- ivoted/Makefile | 4 ++-- ivoted/aie2.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ivoted/Makefile b/ivoted/Makefile index 193771d..b982c80 100644 --- a/ivoted/Makefile +++ b/ivoted/Makefile @@ -35,11 +35,11 @@ endif build/aie.mlir: $(srcdir)/$(aie_py_src) @mkdir -p $(@D) - python3 $< -d $(devicename) -i1s $(in1_size) -i2s $(in2_size) -os $(out_size) > $@ + python3 $< -d $(devicename) -i1s $(in1_size) -i2s $(in2_size) -os $(out_size) -of $@ build/aie_trace.mlir: $(srcdir)/$(aie_py_src) @mkdir -p $(@D) - python3 $< -d $(devicename) -i1s $(in1_size) -i2s $(in2_size) -os $(out_size) -t $(trace_size) > $@ + python3 $< -d $(devicename) -i1s $(in1_size) -i2s $(in2_size) -os $(out_size) -t $(trace_size) -of $@ build/final.xclbin: build/aie.mlir build/scale.o @mkdir -p $(@D) diff --git a/ivoted/aie2.py b/ivoted/aie2.py index 31f570c..88d1503 100644 --- a/ivoted/aie2.py +++ b/ivoted/aie2.py @@ -99,15 +99,15 @@ def core_fn(of_in, of_factor, of_out, scale_scalar): # Create the program from the device type and runtime my_program = Program(dev, rt) - + # Place components (assign them resources on the device) and generate an MLIR module return my_program.resolve_program() # Parse module arguments -if len(sys.argv) < 5: +if len(sys.argv) < 6: raise ValueError( - "[ERROR] Need at least 4 arguments (dev, in1_size, in2_size, out_size)" + "[ERROR] Need at least 5 arguments (dev, in1_size, in2_size, out_size, output_file)" ) p = argparse.ArgumentParser() p.add_argument("-d", "--dev", required=True, dest="device", help="AIE Device") @@ -126,6 +126,9 @@ def core_fn(of_in, of_factor, of_out, scale_scalar): default=0, help="Trace buffer size", ) + +p.add_argument("-of", "--output-file", required=True, dest="output_file", help="The name in which the generated MLIR mldule will be written to") + opts = p.parse_args(sys.argv[1:]) if opts.device == "npu": @@ -146,4 +149,5 @@ def core_fn(of_in, of_factor, of_out, scale_scalar): module = my_vector_scalar_mul(dev, in1_size, in2_size, out_size, trace_size) # Print the generated MLIR - DO NOT REMOVE -print(module) \ No newline at end of file +with open(opts.output_file, "w") as f: + print(module, file=f) \ No newline at end of file From c55e942bdb18cb6f4ef6b493b7527a5d138f437a Mon Sep 17 00:00:00 2001 From: "Andrea Oggioni (aupcloud)" <24810621+etabeta1@users.noreply.github.com> Date: Sat, 23 May 2026 14:09:48 +0000 Subject: [PATCH 3/3] Fix typo --- ivoted/aie2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivoted/aie2.py b/ivoted/aie2.py index 88d1503..6220f39 100644 --- a/ivoted/aie2.py +++ b/ivoted/aie2.py @@ -127,7 +127,7 @@ def core_fn(of_in, of_factor, of_out, scale_scalar): help="Trace buffer size", ) -p.add_argument("-of", "--output-file", required=True, dest="output_file", help="The name in which the generated MLIR mldule will be written to") +p.add_argument("-of", "--output-file", required=True, dest="output_file", help="The name of the file in which the generated MLIR mldule will be written to") opts = p.parse_args(sys.argv[1:])