Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocations in broadcasts with Ref #946

Closed
charleskawczynski opened this issue Sep 15, 2022 · 0 comments · Fixed by #945
Closed

Allocations in broadcasts with Ref #946

charleskawczynski opened this issue Sep 15, 2022 · 0 comments · Fixed by #945
Labels
bug Something isn't working

Comments

@charleskawczynski
Copy link
Member

charleskawczynski commented Sep 15, 2022

Describe the bug

We're incurring allocations in broadcast statements involving the use of Ref.

@charleskawczynski charleskawczynski added the bug Something isn't working label Sep 15, 2022
bors bot added a commit that referenced this issue Sep 15, 2022
945: Inline `copyto!` to fix Ref allocations r=charleskawczynski a=charleskawczynski

This PR applies ``@inline`` to `copyto!`, which was found to fix allocations with `Ref`s inside broadcast expressions, and adds tests. I'm going to try this out with ClimaAtmos to see if one more minor change is needed, too.

This fixes our `bycolumn` allocations with `Ref`s from 24576 bytes to 0.

Closes #946.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
bors bot added a commit that referenced this issue Sep 15, 2022
945: Inline `copyto!` to fix Ref allocations r=charleskawczynski a=charleskawczynski

This PR applies ``@inline`` to `copyto!`, which was found to fix allocations with `Ref`s inside broadcast expressions, and adds tests. I'm going to try this out with ClimaAtmos to see if one more minor change is needed, too.

This fixes our `bycolumn` allocations with `Ref`s from 24576 bytes to 0.

Closes #946.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
bors bot added a commit that referenced this issue Sep 15, 2022
945: Inline `copyto!` to fix Ref allocations r=charleskawczynski a=charleskawczynski

This PR applies ``@inline`` to `copyto!`, which was found to fix allocations with `Ref`s inside broadcast expressions, and adds tests. I'm going to try this out with ClimaAtmos to see if one more minor change is needed, too.

This fixes our `bycolumn` allocations with `Ref`s from 24576 bytes to 0.

Closes #946.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
@bors bors bot closed this as completed in fe0870a Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant