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

Try to fix FieldVector inference #2079

Merged
merged 3 commits into from
Sep 9, 2023
Merged

Try to fix FieldVector inference #2079

merged 3 commits into from
Sep 9, 2023

Conversation

charleskawczynski
Copy link
Member

This PR is an attempt to fix the very bad remaining inference failure in the TC step! function, by calling a different FieldVector constructor to avoid the inference failure in (what I assume is promote_type(map(RecursiveArrayTools.recursive_bottom_eltype, values)...)).

Inference currently looks like this in the EDMF flame graph:
Screen Shot 2023-09-08 at 11 09 07 AM

Let's see if this PR has any impact.

cc @LenkaNovak, @akshaysridhar

This is why I suggested adding JET tests in CliMA/ClimaCore.jl#1441, it will work, but it will be impractically slow. This flame graph is for a column, I imagine the sphere would be much worse.

@szy21
Copy link
Member

szy21 commented Sep 8, 2023

We will delete this folder soon (hopefully next week). I wonder if we need to fix this, or it it a more general issue?

@charleskawczynski
Copy link
Member Author

We will delete this folder soon (hopefully next week). I wonder if we need to fix this, or it it a more general issue?

Sounds good to me, this is more to see if these changes will fix the issue in light of CliMA/ClimaCore.jl#1441

Skip calling Fields.wrap
@charleskawczynski charleskawczynski force-pushed the ck/try_to_fix_fv_inference branch 2 times, most recently from ba08c9e to 5103d5f Compare September 8, 2023 23:13
@charleskawczynski charleskawczynski force-pushed the ck/try_to_fix_fv_inference branch from 5103d5f to 285a506 Compare September 9, 2023 00:10
@charleskawczynski
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 9, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit f751e69 into main Sep 9, 2023
6 checks passed
@bors bors bot deleted the ck/try_to_fix_fv_inference branch September 9, 2023 03:11
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