From c56de17a18dacad82ba0cc077a1f61161d571acd Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 12 Sep 2024 09:03:28 -0400 Subject: [PATCH 1/2] Fix inference for column broadcasting --- src/DataLayouts/broadcast.jl | 3 ++- test/Fields/field_opt.jl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DataLayouts/broadcast.jl b/src/DataLayouts/broadcast.jl index fa4ad4f330..8be07a9662 100644 --- a/src/DataLayouts/broadcast.jl +++ b/src/DataLayouts/broadcast.jl @@ -252,7 +252,8 @@ Base.@propagate_inbounds function column( ) where {Nv, N, DS <: Union{Data1DXStyle{Nv, N}, Data2DXStyle{Nv, N}}} _args = column_args(bc.args, inds...) _axes = nothing - Base.Broadcast.Broadcasted{DataColumnStyle(DS)}(bc.f, _args, _axes) + bcc = Base.Broadcast.Broadcasted{DataColumnStyle(DS)}(bc.f, _args, _axes) + Base.Broadcast.instantiate(bcc) end @inline function column( diff --git a/test/Fields/field_opt.jl b/test/Fields/field_opt.jl index 83d57100c2..24955cdbb5 100644 --- a/test/Fields/field_opt.jl +++ b/test/Fields/field_opt.jl @@ -390,7 +390,7 @@ using JET ρ = Fields.Field(Float64, cspace) S = Fields.Field(Float64, cspace) ifelsekernel!(S, ρ) - @test_opt broken = true ifelsekernel!(S, ρ) + @test_opt ifelsekernel!(S, ρ) end nothing From 1387b6d30ae6061fe312d7c2e7868555ed8c6b55 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 12 Sep 2024 10:23:16 -0400 Subject: [PATCH 2/2] Bump patch version and update news --- NEWS.md | 5 +++++ Project.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 54aab3715c..b3b7a4b494 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,11 @@ ClimaCore.jl Release Notes main ------- +v0.14.14 +------- + +- Inference was fixed for some broadcast expressions involving columns PR [#1984](https://github.com/CliMA/ClimaCore.jl/pull/1984). + v0.14.13 ------- diff --git a/Project.toml b/Project.toml index e7f19bf3ec..46777dac66 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimaCore" uuid = "d414da3d-4745-48bb-8d80-42e94e092884" authors = ["CliMA Contributors "] -version = "0.14.13" +version = "0.14.14" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"