compilation: stop pinning aiecc to one thread - #185
Merged
Merged
Conversation
Both aiecc rules defaulted AIECC_JOBS to 1, so every design's per-core compiles ran serially. On the encoder-MHA design (24 cores) that is 7.7 s against 6.0 s at aiecc's own auto-detect; nothing above 8 helps. -j does not change the output: insts.bin and all 24 per-core ELFs are byte-identical between -j1 and -j16.
andrej
approved these changes
Sep 8, 2026
andrej
left a comment
Collaborator
There was a problem hiding this comment.
Is anything setting AIECC_JOBS = 1 for CI? If not, please add that, our our CI will constantly OOM.
Comment on lines
+559
to
+564
| # aiecc's own default. "1" here made every design's per-core compiles serial: on | ||
| # the encoder-MHA design (24 cores) aiecc costs 7.7 s at -j1 and 6.0 s at -j0, and | ||
| # nothing above 8 helps. Safe because -j does not change what aiecc produces -- | ||
| # measured on that design, insts.bin and all 24 per-core ELFs are byte-identical | ||
| # between -j1 and -j16, and input_with_addresses.mlir differs only in the work-dir | ||
| # path it embeds, which two runs at the SAME -j also differ in. |
Collaborator
There was a problem hiding this comment.
Suggested change
| # aiecc's own default. "1" here made every design's per-core compiles serial: on | |
| # the encoder-MHA design (24 cores) aiecc costs 7.7 s at -j1 and 6.0 s at -j0, and | |
| # nothing above 8 helps. Safe because -j does not change what aiecc produces -- | |
| # measured on that design, insts.bin and all 24 per-core ELFs are byte-identical | |
| # between -j1 and -j16, and input_with_addresses.mlir differs only in the work-dir | |
| # path it embeds, which two runs at the SAME -j also differ in. | |
| # Default parallelism setting used when environment variable AIECC_JOBS is not set. | |
| # 0 means auto-detect. |
Contributor
CI Test Results06c8b39 (2026_09_17_18_06_42) IRON - CI SummaryExamplesiron/applications/llama_3.2_1b
Smalliron/operators/axpy
iron/operators/dequant
iron/operators/elementwise_add
iron/operators/elementwise_mul
iron/operators/flm/gemm
iron/operators/gelu
iron/operators/gemm
iron/operators/gemv
iron/operators/layer_norm
iron/operators/leaky_relu
iron/operators/mem_copy
iron/operators/mha
iron/operators/relu
iron/operators/repeat
iron/operators/rms_norm
iron/operators/rope
iron/operators/sigmoid
iron/operators/silu
iron/operators/softmax
iron/operators/strided_copy
iron/operators/swiglu_decode
iron/operators/swiglu_prefill
iron/operators/tanh
iron/operators/transpose
Krackan - SmallIRONTested on iron/operators/axpy
iron/operators/dequant
iron/operators/elementwise_add
iron/operators/elementwise_mul
iron/operators/flm/gemm
iron/operators/gelu
iron/operators/gemm
iron/operators/gemv
iron/operators/layer_norm
iron/operators/leaky_relu
iron/operators/mem_copy
iron/operators/mha
iron/operators/relu
iron/operators/repeat
iron/operators/rms_norm
iron/operators/rope
iron/operators/sigmoid
iron/operators/silu
iron/operators/softmax
iron/operators/strided_copy
iron/operators/swiglu_decode
iron/operators/swiglu_prefill
iron/operators/tanh
iron/operators/transpose
Krackan - ExamplesIRONTested on iron/applications/llama_3.2_1b
Phoenix - SmallIRONTested on iron/operators/axpy
iron/operators/dequant
iron/operators/elementwise_add
iron/operators/elementwise_mul
iron/operators/flm/gemm
iron/operators/gelu
iron/operators/gemm
iron/operators/gemv
iron/operators/layer_norm
iron/operators/leaky_relu
iron/operators/mem_copy
iron/operators/relu
iron/operators/repeat
iron/operators/rms_norm
iron/operators/rope
iron/operators/sigmoid
iron/operators/silu
iron/operators/softmax
iron/operators/strided_copy
iron/operators/swiglu_decode
iron/operators/swiglu_prefill
iron/operators/tanh
iron/operators/transpose
Phoenix - ExamplesIRONTested on Trend tables omitted, the comment hit GitHub's size limit. Full report in the workflow run. |
Collaborator
|
@atassis Can you please pin AIECC_JOBS=1 in the CI scripts so I can merge this? |
Keeps CI's per-core compiles serial now that the library default is aiecc's auto-detect.
Contributor
Author
|
@andrej Hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both aiecc rules default
AIECC_JOBSto1:so every design's per-core compiles run one at a time, whatever the machine has. aiecc's own default
is auto-detect, and nothing here explains the override.
Fix
Default to
0, which is aiecc's auto-detect. The environment variable still overrides, so anyone whowants one thread keeps it.
Test
On a 24-core design (
StaticMHA, 20 heads, 8 pipelines): aiecc goes from 7.7 s to 6.0 s. Nothingabove 8 threads helps.
-jdoes not change what aiecc produces, so this is safe rather than a trade:insts.binand all 24per-core ELFs are byte-identical between
-j1and-j16, andinput_with_addresses.mlirdiffersonly in the work-dir path it embeds — which two runs at the same
-jalso differ in.