Skip to content

Fix unrolling over field broadcast arguments - #2350

Merged
dennisYatunin merged 1 commit into
mainfrom
dy/broadcast_argument_unrolling
Jun 28, 2025
Merged

Fix unrolling over field broadcast arguments#2350
dennisYatunin merged 1 commit into
mainfrom
dy/broadcast_argument_unrolling

Conversation

@dennisYatunin

Copy link
Copy Markdown
Member

This PR overrides the recursive unrolling used in Base.Broadcast.combine_styles with manual unrolling, which will hopefully allow us to avoid inference issues in broadcast expressions with many arguments. Specifically, this should allow us to fix the allocations and inference failures in CliMA/ClimaAtmos.jl#3864.

  • Code follows the style guidelines OR N/A.
  • Unit tests are included OR N/A.
  • Code is exercised in an integration test OR N/A.
  • Documentation has been added/updated OR N/A.

@dennisYatunin
dennisYatunin requested a review from costachris June 27, 2025 01:04
@dennisYatunin
dennisYatunin force-pushed the dy/broadcast_argument_unrolling branch from 886808b to 39a7ee9 Compare June 27, 2025 10:09
@dennisYatunin
dennisYatunin force-pushed the dy/broadcast_argument_unrolling branch from 39a7ee9 to 66c0a84 Compare June 27, 2025 10:15
@dennisYatunin

Copy link
Copy Markdown
Member Author

This has been tested in https://buildkite.com/clima/climaatmos-ci/builds/24936, and it appears to successfully fix inference issues in Base.Broadcast.combine_styles.

@dennisYatunin
dennisYatunin merged commit bfc36b8 into main Jun 28, 2025
33 of 35 checks passed
@dennisYatunin
dennisYatunin deleted the dy/broadcast_argument_unrolling branch June 28, 2025 00:16
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.

2 participants