Skip to content

Commit 1c7bc03

Browse files
Merge pull request #2144 from CliMA/ck/lazy_broadcast
Update to latest LazyBroadcast
2 parents 61d7417 + a7fffb2 commit 1c7bc03

File tree

15 files changed

+129
-111
lines changed

15 files changed

+129
-111
lines changed

.buildkite/Manifest.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ manifest_format = "2.0"
55
project_hash = "58c4b495a198942d7fe1f15910bfa6451b6fdb53"
66

77
[[deps.ADTypes]]
8-
git-tree-sha1 = "72af59f5b8f09faee36b4ec48e014a79210f2f4f"
8+
git-tree-sha1 = "ab3815fc06f9c171ee81277f00ecee19b47e0b91"
99
uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
10-
version = "1.11.0"
10+
version = "1.12.0"
1111

1212
[deps.ADTypes.extensions]
1313
ADTypesChainRulesCoreExt = "ChainRulesCore"
@@ -333,7 +333,7 @@ weakdeps = ["CUDA", "MPI"]
333333
deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "Unrolled"]
334334
path = ".."
335335
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
336-
version = "0.14.22"
336+
version = "0.14.23"
337337
weakdeps = ["CUDA", "Krylov"]
338338

339339
[deps.ClimaCore.extensions]
@@ -388,9 +388,9 @@ version = "0.7.6"
388388

389389
[[deps.ColorSchemes]]
390390
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"]
391-
git-tree-sha1 = "c785dfb1b3bfddd1da557e861b919819b82bbe5b"
391+
git-tree-sha1 = "26ec26c98ae1453c692efded2b17e15125a5bea1"
392392
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
393-
version = "3.27.1"
393+
version = "3.28.0"
394394

395395
[[deps.ColorTypes]]
396396
deps = ["FixedPointNumbers", "Random"]
@@ -624,9 +624,9 @@ version = "1.15.1"
624624

625625
[[deps.DifferentiationInterface]]
626626
deps = ["ADTypes", "LinearAlgebra"]
627-
git-tree-sha1 = "e7e4ce7787a74d2ec553e7afbeb1bf949caa90ab"
627+
git-tree-sha1 = "a1ebd42d036132d899d61e45fee4283b2a60c0ab"
628628
uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
629-
version = "0.6.30"
629+
version = "0.6.31"
630630

631631
[deps.DifferentiationInterface.extensions]
632632
DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore"
@@ -668,9 +668,9 @@ version = "0.6.30"
668668

669669
[[deps.DiskArrays]]
670670
deps = ["LRUCache", "Mmap", "OffsetArrays"]
671-
git-tree-sha1 = "90fc70a19edc4e59f22b2b9b8ad46e3d116c6aa7"
671+
git-tree-sha1 = "4687e77a603fcd86738a92758086717cd06cdaae"
672672
uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
673-
version = "0.4.7"
673+
version = "0.4.8"
674674

675675
[[deps.Distributed]]
676676
deps = ["Random", "Serialization", "Sockets"]
@@ -901,15 +901,15 @@ version = "1.1.0"
901901

902902
[[deps.GR]]
903903
deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"]
904-
git-tree-sha1 = "424c8f76017e39fdfcdbb5935a8e6742244959e8"
904+
git-tree-sha1 = "9bf00ba4c45867c86251a7fd4cb646dcbeb41bf0"
905905
uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
906-
version = "0.73.10"
906+
version = "0.73.12"
907907

908908
[[deps.GR_jll]]
909909
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
910-
git-tree-sha1 = "b90934c8cb33920a8dc66736471dc3961b42ec9f"
910+
git-tree-sha1 = "36d5430819123553bf31dfdceb3653ca7d9e62d7"
911911
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
912-
version = "0.73.10+0"
912+
version = "0.73.12+0"
913913

914914
[[deps.GaussQuadrature]]
915915
deps = ["SpecialFunctions"]
@@ -1113,9 +1113,9 @@ version = "0.4.10"
11131113

11141114
[[deps.KernelAbstractions]]
11151115
deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs"]
1116-
git-tree-sha1 = "b9a838cd3028785ac23822cded5126b3da394d1a"
1116+
git-tree-sha1 = "019e9de20154148a4937965ec43084435e946450"
11171117
uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
1118-
version = "0.9.31"
1118+
version = "0.9.32"
11191119
weakdeps = ["EnzymeCore", "LinearAlgebra", "SparseArrays"]
11201120

11211121
[deps.KernelAbstractions.extensions]
@@ -1131,9 +1131,9 @@ version = "0.9.9"
11311131

11321132
[[deps.KrylovKit]]
11331133
deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"]
1134-
git-tree-sha1 = "89376a14457055fee32639a7040abeb858a8387b"
1134+
git-tree-sha1 = "d7ed24a88732689f26d3f12a817d181d4024bf44"
11351135
uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
1136-
version = "0.9.0"
1136+
version = "0.8.3"
11371137

11381138
[deps.KrylovKit.extensions]
11391139
KrylovKitChainRulesCoreExt = "ChainRulesCore"
@@ -1227,9 +1227,9 @@ deps = ["Artifacts", "Pkg"]
12271227
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
12281228

12291229
[[deps.LazyBroadcast]]
1230-
git-tree-sha1 = "54fdcfd900bb7c66876d1f3f608e88cdfa68afc4"
1230+
git-tree-sha1 = "6d2586dfde8b989198181fe21b8b6d0a42787ab8"
12311231
uuid = "9dccce8e-a116-406d-9fcc-a88ed4f510c8"
1232-
version = "0.1.5"
1232+
version = "1.0.0"
12331233

12341234
[[deps.LeftChildRightSiblingTrees]]
12351235
deps = ["AbstractTrees"]
@@ -1930,9 +1930,9 @@ version = "0.1.0"
19301930

19311931
[[deps.SciMLBase]]
19321932
deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"]
1933-
git-tree-sha1 = "a263684f4134d50fe1863184281cc04a787a96a2"
1933+
git-tree-sha1 = "3ff67684267d8963fa754a5e4ce7db8ab1891013"
19341934
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1935-
version = "2.71.0"
1935+
version = "2.71.3"
19361936

19371937
[deps.SciMLBase.extensions]
19381938
SciMLBaseChainRulesCoreExt = "ChainRulesCore"
@@ -2341,9 +2341,9 @@ version = "1.0.1"
23412341

23422342
[[deps.VectorInterface]]
23432343
deps = ["LinearAlgebra"]
2344-
git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec"
2344+
git-tree-sha1 = "cea8abaa6e43f72f97a09cf95b80c9eb53ff75cf"
23452345
uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
2346-
version = "0.5.0"
2346+
version = "0.4.9"
23472347

23482348
[[deps.Vulkan_Loader_jll]]
23492349
deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"]

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ InteractiveUtils = "1"
5959
IntervalSets = "0.5, 0.6, 0.7"
6060
JET = "0.9"
6161
Krylov = "0.9"
62-
KrylovKit = "0.6, 0.7, 0.8, 0.9"
63-
LazyBroadcast = "0.1.4"
62+
KrylovKit = "0.6, 0.7, 0.8"
63+
LazyBroadcast = "1"
6464
LinearAlgebra = "1"
6565
Logging = "1"
6666
MultiBroadcastFusion = "0.3.1, 0.4"

benchmarks/bickleyjet/Manifest.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ version = "0.6.5"
233233
deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "Unrolled"]
234234
path = "../.."
235235
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
236-
version = "0.14.22"
236+
version = "0.14.23"
237237

238238
[deps.ClimaCore.extensions]
239239
ClimaCoreCUDAExt = "CUDA"
@@ -251,9 +251,9 @@ version = "0.7.6"
251251

252252
[[deps.ColorSchemes]]
253253
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"]
254-
git-tree-sha1 = "c785dfb1b3bfddd1da557e861b919819b82bbe5b"
254+
git-tree-sha1 = "26ec26c98ae1453c692efded2b17e15125a5bea1"
255255
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
256-
version = "3.27.1"
256+
version = "3.28.0"
257257

258258
[[deps.ColorTypes]]
259259
deps = ["FixedPointNumbers", "Random"]
@@ -530,15 +530,15 @@ version = "1.1.0"
530530

531531
[[deps.GR]]
532532
deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"]
533-
git-tree-sha1 = "424c8f76017e39fdfcdbb5935a8e6742244959e8"
533+
git-tree-sha1 = "9bf00ba4c45867c86251a7fd4cb646dcbeb41bf0"
534534
uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
535-
version = "0.73.10"
535+
version = "0.73.12"
536536

537537
[[deps.GR_jll]]
538538
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
539-
git-tree-sha1 = "b90934c8cb33920a8dc66736471dc3961b42ec9f"
539+
git-tree-sha1 = "36d5430819123553bf31dfdceb3653ca7d9e62d7"
540540
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
541-
version = "0.73.10+0"
541+
version = "0.73.12+0"
542542

543543
[[deps.GaussQuadrature]]
544544
deps = ["SpecialFunctions"]
@@ -700,9 +700,9 @@ version = "0.2.1+0"
700700

701701
[[deps.KernelAbstractions]]
702702
deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs"]
703-
git-tree-sha1 = "b9a838cd3028785ac23822cded5126b3da394d1a"
703+
git-tree-sha1 = "019e9de20154148a4937965ec43084435e946450"
704704
uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
705-
version = "0.9.31"
705+
version = "0.9.32"
706706

707707
[deps.KernelAbstractions.extensions]
708708
EnzymeExt = "EnzymeCore"
@@ -716,9 +716,9 @@ version = "0.9.31"
716716

717717
[[deps.KrylovKit]]
718718
deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"]
719-
git-tree-sha1 = "89376a14457055fee32639a7040abeb858a8387b"
719+
git-tree-sha1 = "d7ed24a88732689f26d3f12a817d181d4024bf44"
720720
uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
721-
version = "0.9.0"
721+
version = "0.8.3"
722722

723723
[deps.KrylovKit.extensions]
724724
KrylovKitChainRulesCoreExt = "ChainRulesCore"
@@ -1510,9 +1510,9 @@ version = "0.2.0"
15101510

15111511
[[deps.VectorInterface]]
15121512
deps = ["LinearAlgebra"]
1513-
git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec"
1513+
git-tree-sha1 = "cea8abaa6e43f72f97a09cf95b80c9eb53ff75cf"
15141514
uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
1515-
version = "0.5.0"
1515+
version = "0.4.9"
15161516

15171517
[[deps.Vulkan_Loader_jll]]
15181518
deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"]

benchmarks/scripts/benchmark_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# import CUDA
22
import ClimaComms
33
using BenchmarkTools, Dates
4-
using LazyBroadcast: @lazy
4+
using ClimaCore: @lazy
55

66
"""
77
caller_name(@__FILE__)

benchmarks/scripts/index_swapping.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ end;
6363
function custom_kernel_bc!(X, Y, us::UniversalSizesStatic; swap=0, printtb=false, nreps = 1, print_info = true, bm=nothing, n_trials=30)
6464
(; x1, x2, x3) = X
6565
(; y1) = Y
66-
bc = @lazy @. y1 = foo(x1, x2, x3)
66+
bc = @lazy @. foo(x1, x2, x3)
6767
@assert !(y1 isa Array)
6868
f = if swap==0
6969
custom_kernel_knl_bc_0swap!

benchmarks/scripts/indexing_and_static_ndranges.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ end;
298298
function custom_kernel_bc!(X, Y, us::AbstractUniversalSizes; printtb=false, use_pw=true, nreps = 1, bm=nothing, n_trials = 30)
299299
(; x1, x2, x3) = X
300300
(; y1) = Y
301-
bc_base = @lazy @. y1 = myadd(x1, x2, x3)
301+
bc_base = @lazy @. myadd(x1, x2, x3)
302302
bc = use_pw ? to_pointwise_bc(bc_base) : bc_base
303303
e = Inf
304304
if y1 isa Array

lib/ClimaCoreMakie/examples/Manifest.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ version = "0.6.5"
227227
deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "Unrolled"]
228228
path = "../../.."
229229
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
230-
version = "0.14.22"
230+
version = "0.14.23"
231231

232232
[deps.ClimaCore.extensions]
233233
ClimaCoreCUDAExt = "CUDA"
@@ -257,9 +257,9 @@ version = "0.4.1"
257257

258258
[[deps.ColorSchemes]]
259259
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"]
260-
git-tree-sha1 = "c785dfb1b3bfddd1da557e861b919819b82bbe5b"
260+
git-tree-sha1 = "26ec26c98ae1453c692efded2b17e15125a5bea1"
261261
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
262-
version = "3.27.1"
262+
version = "3.28.0"
263263

264264
[[deps.ColorTypes]]
265265
deps = ["FixedPointNumbers", "Random"]
@@ -381,9 +381,9 @@ version = "1.14.10+0"
381381

382382
[[deps.DelaunayTriangulation]]
383383
deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "Random"]
384-
git-tree-sha1 = "e1371a23fd9816080c828d0ce04373857fe73d33"
384+
git-tree-sha1 = "5620ff4ee0084a6ab7097a27ba0c19290200b037"
385385
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
386-
version = "1.6.3"
386+
version = "1.6.4"
387387

388388
[[deps.Deno_jll]]
389389
deps = ["Artifacts", "JLLWrappers", "Libdl"]
@@ -621,21 +621,21 @@ uuid = "d54b0c1a-921d-58e0-8e36-89d8069c0969"
621621
version = "0.5.8"
622622

623623
[[deps.GeoFormatTypes]]
624-
git-tree-sha1 = "ce573eab15760315756de2c82df7406c870c7187"
624+
git-tree-sha1 = "8e233d5167e63d708d41f87597433f59a0f213fe"
625625
uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f"
626-
version = "0.4.3"
626+
version = "0.4.4"
627627

628628
[[deps.GeoInterface]]
629629
deps = ["DataAPI", "Extents", "GeoFormatTypes"]
630-
git-tree-sha1 = "f4ee66b6b1872a4ca53303fbb51d158af1bf88d4"
630+
git-tree-sha1 = "294e99f19869d0b0cb71aef92f19d03649d028d5"
631631
uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
632-
version = "1.4.0"
632+
version = "1.4.1"
633633

634634
[[deps.GeoInterfaceMakie]]
635635
deps = ["GeoInterface", "GeometryBasics", "MakieCore"]
636-
git-tree-sha1 = "3f87fd8414194dd25ea5d0371c3950985e3c8d86"
636+
git-tree-sha1 = "378afe561ba990392146e1a7abd472c7db7f1479"
637637
uuid = "0edc0954-3250-4c18-859d-ec71c1660c08"
638-
version = "0.1.8"
638+
version = "0.1.9"
639639

640640
[[deps.GeoInterfaceRecipes]]
641641
deps = ["GeoInterface", "RecipesBase"]
@@ -645,9 +645,9 @@ version = "1.0.2"
645645

646646
[[deps.GeoJSON]]
647647
deps = ["Extents", "GeoFormatTypes", "GeoInterface", "GeoInterfaceMakie", "GeoInterfaceRecipes", "JSON3", "StructTypes", "Tables"]
648-
git-tree-sha1 = "e2ae0c6d4f6b8c49eccc261fef29c290998e44a5"
648+
git-tree-sha1 = "e17756f8cb7f2356adfe940a6cf82f4c33c88c4c"
649649
uuid = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
650-
version = "0.8.1"
650+
version = "0.8.2"
651651
weakdeps = ["Makie"]
652652

653653
[deps.GeoJSON.extensions]
@@ -672,10 +672,10 @@ uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
672672
version = "0.4.11"
673673

674674
[[deps.GeometryOps]]
675-
deps = ["CoordinateTransformations", "DataAPI", "DelaunayTriangulation", "ExactPredicates", "GeoInterface", "GeometryBasics", "InteractiveUtils", "LinearAlgebra", "SortTileRecursiveTree", "Statistics", "Tables"]
676-
git-tree-sha1 = "51857a37476d46ff9ee99d188de1b4ce0382594d"
675+
deps = ["CoordinateTransformations", "DataAPI", "DelaunayTriangulation", "ExactPredicates", "GeoInterface", "GeometryBasics", "LinearAlgebra", "SortTileRecursiveTree", "Statistics", "Tables"]
676+
git-tree-sha1 = "7eaffabf21dcdc7a5e543c309b903371af5c9b07"
677677
uuid = "3251bfac-6a57-4b6d-aa61-ac1fef2975ab"
678-
version = "0.1.13"
678+
version = "0.1.14"
679679

680680
[deps.GeometryOps.extensions]
681681
GeometryOpsFlexiJoinsExt = "FlexiJoins"
@@ -952,9 +952,9 @@ version = "0.6.9"
952952

953953
[[deps.KrylovKit]]
954954
deps = ["LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"]
955-
git-tree-sha1 = "89376a14457055fee32639a7040abeb858a8387b"
955+
git-tree-sha1 = "d7ed24a88732689f26d3f12a817d181d4024bf44"
956956
uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
957-
version = "0.9.0"
957+
version = "0.8.3"
958958
weakdeps = ["ChainRulesCore"]
959959

960960
[deps.KrylovKit.extensions]
@@ -1865,9 +1865,9 @@ version = "0.1.5"
18651865

18661866
[[deps.VectorInterface]]
18671867
deps = ["LinearAlgebra"]
1868-
git-tree-sha1 = "9166406dedd38c111a6574e9814be83d267f8aec"
1868+
git-tree-sha1 = "cea8abaa6e43f72f97a09cf95b80c9eb53ff75cf"
18691869
uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
1870-
version = "0.5.0"
1870+
version = "0.4.9"
18711871

18721872
[[deps.VersionParsing]]
18731873
git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868"

src/ClimaCore.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ using PkgVersion
44
const VERSION = PkgVersion.@Version
55
import ClimaComms
66

7+
# Temporary helpers to work around https://github.com/CliMA/ClimaCore.jl/issues/2146
8+
include("lazy_broadcast.jl")
9+
710
include("DebugOnly/DebugOnly.jl")
811
include("interface.jl")
912
include("devices.jl")

src/lazy_broadcast.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Temporary helpers to work around https://github.com/CliMA/ClimaCore.jl/issues/2146
2+
using Base.Broadcast: materialize, instantiate
3+
import Base.Broadcast: broadcasted
4+
function _lazy_broadcast end
5+
struct LazyBroadcasted{T}
6+
value::T
7+
end
8+
Base.Broadcast.broadcasted(::typeof(_lazy_broadcast), x) = LazyBroadcasted(x)
9+
# Cannot return instantiated object here, due to https://github.com/CliMA/ClimaCore.jl/issues/2146
10+
Base.materialize(x::LazyBroadcasted) = x.value
11+
macro _lazy_broadcast(expr)
12+
return quote
13+
_lazy_broadcast.($(esc(expr)))
14+
end
15+
end
16+
macro lazy(expr)
17+
return quote
18+
_lazy_broadcast.($(esc(expr)))
19+
end
20+
end

0 commit comments

Comments
 (0)