You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix GPU incompatibilities and remaining unmigrated code
Applies the fixes for the CI failures on the previous commit:
- Mark a dynamic Nh with nothing instead of missing, since missing cannot
appear in the type parameters of any GPU kernel argument (GPUCompiler
mangles kernel names by comparing type parameters with ==, and the
three-valued logic of missing makes those comparisons non-boolean)
- Switch to the new parent array's DataScope in rebuild whenever it is not
a subscope of the original scope, so that moving data between devices
(with Adapt, gather, or an array conversion) updates its scope; slices
keep their scopes, which can be narrower than what their types imply
- Capture kwargs as NamedTuples in CUDA kernel closures, since the Pairs
structure stores its names in a Tuple of Symbols, which is not a bitstype
- Run loops sequentially when they are nested in multithreaded loops
located outside of ClimaCore, distinguishing external threads from the
pool's own worker tasks through each task's local storage
- Replace closures passed to sum in DSS code with accumulation loops; the
closures box variables assigned in multiple branches and pull in an
empty-collection error path, neither of which can compile in GPU kernels
(on CPUs, the error path's runtime dispatch gets flagged by JET)
- Avoid indexing with colons in GPU kernels, which allocates copies, and
fix two missing exclamation marks in calls to auto_launch!
- Migrate ClimaCorePlots to the new DataLayouts API, fixing the plotting
slice loop bounds that filled buffers with NaNs, and update the column
examples to plot vectors instead of multidimensional parent arrays
- Update the SEM benchmark utilities, the CUDA threadblock partition test,
and the copyto! benchmark for the new API; wrap a bare tuple broadcast
in the deformation flow example (bare multi-element tuples broadcast as
collections along the first dimension, matching Base's semantics)
- Compare reductions against a pairwise mapreduce over linear positions in
unit tests, since the SIMD blocks in Base's optimized methods for dense
arrays can reassociate values differently on different CPUs; loosen the
JET failure count in opt_spaces, which is 122 on Julia 1.10
All 174 single-rank CPU-only steps from the Buildkite pipeline pass locally
with these changes, including all examples and performance scripts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments