From 1e0d6c9f17b0fbd0a9bfeb6c28dd35392839f6df Mon Sep 17 00:00:00 2001 From: Taimuraz Kaitmazov Date: Sat, 11 Jul 2026 00:42:24 +0300 Subject: [PATCH] compilation: honor AIECC_PATH and AIECC_JOBS env overrides Two opt-in build-ergonomics knobs on the aiecc compilation rules; both default to current behavior so nothing changes unless the env var is set. - AIECC_PATH: point the compilation rules at a locally-built aiecc (e.g. a compiler under development) instead of the one under mlir_aie_dir/bin, without having to replace the installed binary. - AIECC_JOBS: pass -j to aiecc instead of the hardcoded -j1, so multi-core hosts can compile the AIE cores in parallel. Default '1' = unchanged. --- iron/common/compilation/base.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/iron/common/compilation/base.py b/iron/common/compilation/base.py index dd201996..240ec88c 100644 --- a/iron/common/compilation/base.py +++ b/iron/common/compilation/base.py @@ -490,7 +490,14 @@ def __init__( self, build_dir, peano_dir, mlir_aie_dir, use_chess=False, *args, **kwargs ): self.build_dir = build_dir - self.aiecc_path = Path(mlir_aie_dir) / "bin" / "aiecc" + # AIECC_PATH lets a build point at a locally-built aiecc (e.g. a compiler under + # development) without replacing the installed one. Default = the installed aiecc. + _aiecc_override = os.environ.get("AIECC_PATH") + self.aiecc_path = ( + Path(_aiecc_override) + if _aiecc_override + else Path(mlir_aie_dir) / "bin" / "aiecc" + ) self.peano_dir = peano_dir self.use_chess = use_chess super().__init__(*args, **kwargs) @@ -508,7 +515,7 @@ def compile(self, graph): compile_cmd = [ str(self.aiecc_path), "-v", - "-j1", + f"-j{os.environ.get('AIECC_JOBS', '1')}", "--no-compile-host", ] if self.use_chess: @@ -562,7 +569,7 @@ def compile(self, graph): compile_cmd = [ str(self.aiecc_path), "-v", - "-j1", + f"-j{os.environ.get('AIECC_JOBS', '1')}", "--no-compile-host", ] if self.use_chess: