Skip to content

Conversation

@dennisYatunin
Copy link
Member

@dennisYatunin dennisYatunin commented Mar 17, 2025

This PR adds a functional form of Base.Cartesian.@ncall to UnrolledUtilities: unrolled_mapcall(f, op, itrs...), which is roughly equivalent to op(unrolled_map(f, itrs...)...). This function reduces compilation time by manually splatting the arguments of op into a function call instead of relying on the compiler to infer and inline the result of Core._apply_iterate(Base.iterate, op, unrolled_map(f, itrs...)). @charleskawczynski's work in CliMA/ClimaCore.jl#2225 has shown that this change and the changes in #25 could allow us to reduce the latency of ClimaCore broadcast expressions.

Note: This PR is split off from #25, so it currently includes both sets of changes. Once that PR is merged in, this one should be rebased.

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.

3 participants