Skip to content

Early Return Pipeline#545

Open
kylebd99 wants to merge 1 commit into
mainfrom
kbd-easier-pipeline-return
Open

Early Return Pipeline#545
kylebd99 wants to merge 1 commit into
mainfrom
kbd-easier-pipeline-return

Conversation

@kylebd99

Copy link
Copy Markdown
Contributor

This PR adds:

  1. a no_compute option to LogicExecutor where it returns whatever its interior ctx produces
  2. a NoOp stage which immediately returns its inputs

An early return pipeline can then look like, e.g. :

LogicNormalizer(
            LogicExecutor( GalleyLogicalOptimizer(DefaultLoopOrderer(NoOpStage()
                    )
                )

@kylebd99

Copy link
Copy Markdown
Contributor Author

Looking at benchmarks/test_galley.py, this PR solves half of the problem. It allows for early return, but it is still a bit inherently complicated to run the first few pipeline stages, intercept the middle, and then benchmark only the remainder. This is because LogicExecutor does things both before and after it calls its child ctx.

@codspeed-hq

codspeed-hq Bot commented Jun 30, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 64.71%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 6 regressed benchmarks
✅ 25 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory test_galley_matmul_chain[empty_last-optimize] 54.8 KB 2,447 KB -97.76%
WallTime test_galley_matmul_chain[empty_last-optimize] 249.5 ms 5,048.6 ms -95.06%
WallTime test_ops_binary[interpret_galley-multiply] 786.2 ms 928.5 ms -15.33%
WallTime test_ops_binary[interpret_galley-add] 787 ms 926 ms -15.01%
WallTime test_ops_reduction[interpret_galley-sum] 419.5 ms 485.6 ms -13.61%
WallTime test_ops_binary[interpret_galley-matmul] 58.9 s 65.7 s -10.48%
Memory test_galley_matmul_chain[dense_last-optimize] 2.6 MB 2.4 MB +10.74%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing kbd-easier-pipeline-return (5216789) with main (64775fa)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add better tooling to run or print from isolated stages in the compiler

1 participant