Added warmups and increased iterations for performance testing#355
Merged
CactusCompute merged 2 commits intocactus-compute:mainfrom Feb 16, 2026
Merged
Conversation
Signed-off-by: Neel Shejwalkar <[email protected]>
Signed-off-by: Neel Shejwalkar <[email protected]>
ncylich
pushed a commit
that referenced
this pull request
Feb 24, 2026
* added warmups and increased iterations to 10 Signed-off-by: Neel Shejwalkar <[email protected]> * deleted extra line Signed-off-by: Neel Shejwalkar <[email protected]> --------- Signed-off-by: Neel Shejwalkar <[email protected]>
cattermelon1234
pushed a commit
to cattermelon1234/cactus
that referenced
this pull request
Feb 28, 2026
…s-compute#355) * added warmups and increased iterations to 10 Signed-off-by: Neel Shejwalkar <[email protected]> * deleted extra line Signed-off-by: Neel Shejwalkar <[email protected]> --------- Signed-off-by: Neel Shejwalkar <[email protected]>
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.
This PR adds warmup runs and increases the default number of iterations that test_performance runs an operation for. This is to warm up caches, avoid initialization overhead and smooth out potential timing spikes. Overall, this change drastically reduces the variance in reported timings/bandwidths (see below). I also tried a higher number of iterations (100) and other optimizations (increasing process priority) but these didn't yield any better results.
Tested moonshine-base on M1 Mac Mini for 10 runs. These are results for the MatMul 1024³ CPU operation
no warmups, 1 iteration
4.309ms, 498.37 GFLOPS
4.816ms, 445.91 GFLOPS
5.322ms, 403.51 GFLOPS
4.270ms, 502.92 GFLOPS
4.186ms, 513.02 GFLOPS
4.591ms, 467.76 GFLOPS
4.567ms, 470.22 GFLOPS
4.431ms, 484.65 GFLOPS
4.859ms, 441.96 GFLOPS
4.586ms, 468.27 GFLOPS
Mean: 4.5996 ms, 469.06 GFLOPS
Std dev: 0.330 ms, 32.94 GFLOPS
5 warmups, 10 iterations
3.585ms, 599.00 GFLOPS
3.374ms, 636.39 GFLOPS
3.362ms, 638.68 GFLOPS
3.422ms, 627.52 GFLOPS
3.524ms, 609.44 GFLOPS
3.604ms, 595.88 GFLOPS
3.468ms, 619.28 GFLOPS
3.448ms, 622.78 GFLOPS
3.354ms, 640.24 GFLOPS
3.471ms, 618.75 GFLOPS
Mean: 3.461 ms, 620.80 GFLOPS
Std dev: 0.0885 ms, 15.71 GFLOPS