Skip to content

Optimise generic sum-factorisation lowering - #5335

Draft
pbrubeck wants to merge 11 commits into
mainfrom
pbrubeck/optimise-sum-factor
Draft

Optimise generic sum-factorisation lowering#5335
pbrubeck wants to merge 11 commits into
mainfrom
pbrubeck/optimise-sum-factor

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • choose contraction plans from bounded, pruned factorisation candidates
  • lower ragged contractions to exact iteration domains
  • preserve shared physically mapped tabulations as finite-element structure
  • add reproducible Johnson--Mercier code-generation metrics

Performance

Generated Johnson--Mercier metrics with the paired FIAT branch:

dim compile FLOPs scalar temps array temps elements AST lines
2D 0.507 s 39,619 41 29 1,509 196
3D 3.211 s 1,016,342 130 69 17,992 530

Validation

  • TSFC sum-factorisation and refactorisation tests: 18 passed
  • benchmark output is generated by benchmarks/johnson_mercier.py

Stack

This is the generic Firedrake foundation. The existing simplex sum-factorisation PR will be retargeted to this branch. Paired FIAT generic PR: firedrakeproject/fiat#276.

AI assistance

OpenAI Codex was used to assist with implementation, refactoring, benchmarking, and drafting this PR. The human contributor remains responsible for understanding, validating, and maintaining the changes.

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.

1 participant