Skip to content

Use FlattenMapper before codegen#263

Merged
inducer merged 1 commit intomainfrom
flat-before-codegen
Feb 16, 2026
Merged

Use FlattenMapper before codegen#263
inducer merged 1 commit intomainfrom
flat-before-codegen

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 16, 2026

  • Smaller expressions to crunch through
  • Throws off flop counts

- Smaller expressions to crunch through
- Throws off flop counts
Copilot AI review requested due to automatic review settings February 16, 2026 15:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds the FlattenMapper from pymbolic to the expression transformation pipeline before code generation to process smaller expressions. The kernel cache version is incremented to ensure regeneration of cached kernels with the new transformation logic.

Changes:

  • Add FlattenMapper to the mapper chain in to_loopy_insns to flatten expressions before other transformations
  • Increment kernel cache version from 1 to 2 to invalidate cached kernels

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sumpy/codegen.py Import FlattenMapper and apply it as the first transformation in the mapper chain
sumpy/version.py Increment kernel cache version to force regeneration of cached kernels

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@inducer inducer merged commit a1bf1e2 into main Feb 16, 2026
23 of 24 checks passed
@inducer inducer deleted the flat-before-codegen branch February 16, 2026 16:19
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