From 774f25b73a4e06ed9b696ce1c53ebed1cf342fb4 Mon Sep 17 00:00:00 2001 From: Jeff Fifield Date: Mon, 29 Apr 2024 09:28:35 -0600 Subject: [PATCH] Print aie-assign-buffer-addresses errors to aiecc stderr (#1427) --- python/compiler/aiecc/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/compiler/aiecc/main.py b/python/compiler/aiecc/main.py index 04439a8d9b..0e048cefed 100644 --- a/python/compiler/aiecc/main.py +++ b/python/compiler/aiecc/main.py @@ -996,7 +996,7 @@ async def run_flow(self): file_with_addresses = self.prepend_tmp("input_with_addresses.mlir") if opts.basic_alloc_scheme: - do_run( + r = do_run( [ "aie-opt", "--aie-assign-buffer-addresses=basic-alloc", @@ -1006,7 +1006,7 @@ async def run_flow(self): ], ) else: - do_run( + r = do_run( [ "aie-opt", "--aie-assign-buffer-addresses", @@ -1015,6 +1015,10 @@ async def run_flow(self): file_with_addresses, ], ) + if r.returncode != 0: + print("Error encountered while assigning buffer addresses. Exiting...") + print(r.stderr, file=sys.stderr) + sys.exit(r.returncode) cores = generate_cores_list(await read_file_async(file_with_addresses)) t = do_run(