Joseph Kump

Results 16 issues of Joseph Kump

Added an additional test to the enzyme test set for differentiating a `HydrostaticFreeSurfaceModel` with tracer advection and diffusion.

testing 🧪
extensions 🧬

Just replaced the tuple line in `permute_boundary_conditions` (in file `src/BoundaryConditionsfill_halo_regions.jl`) with an ntuple call that makes it type-stable and eases use of Enzyme.

@wsmoses ``` ERROR: LoadError: TypeError: in new, expected Tuple{Tuple{Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Flux, Nothing}}, Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Flux, Oceananigans.BoundaryConditions.ContinuousBoundaryFunction{Center, Center, Nothing, Oceananigans.BoundaryConditions.RightBoundary, typeof(tracer_flux), @NamedTuple{surface_tracer_concentration::Int64, piston_velocity::Float64}, Tuple{Symbol}, Tuple{Int64}, Tuple{typeof(Oceananigans.Operators.identity4)}}}}}, Tuple{Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}}, Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}}}, Tuple{Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}}, Tuple{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}}}}, got...

@wsmoses ``` ERROR: LoadError: Enzyme execution failed. Enzyme: Not yet implemented, mixed activity for jl_new_struct constants=Bool[1, 0] %91 = call noalias nonnull {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**,...

There was a bug in some recent updates to KernelAbstractions.jl that caused Enzyme to break on broadcasting arrays in Oceananigans. This PR includes a test to make sure this bug...

This adds an enzyme test for differentiating flux boundary conditions with Enzyme, which is of interest for solving inverse problems and other applications. @wsmoses

This is a continuation of [issue 485 in KernelAbstractions.jl](https://github.com/JuliaGPU/KernelAbstractions.jl/issues/485), which now appears to be more of an Enzyme issue. Given this kernel called on CPU and function wrapper, where the...

Running this code using the current versions of Enzyme, KA, and CUDA.jl: ``` using KernelAbstractions using CUDA using Enzyme function advanceTimeLevels!(field; backend=CUDABackend()) nthreads = 64 kernel2d! = advance_2d_array(backend, nthreads) kernel2d!(field,...

This adds a test for Enzyme AD applied to a hydrostatic free surface model with `ExplicitFreeSurface` momentum advection.

extensions 🧬

Running this script: [https://github.com/DJ4Earth/Enzymanigans.jl/blob/jlk9/with-simulation/dynamical_core/autodiff_double_gyre_reactant.jl](https://github.com/DJ4Earth/Enzymanigans.jl/blob/jlk9/with-simulation/dynamical_core/autodiff_double_gyre_reactant.jl) Produces this error: [error_0331.txt](https://github.com/user-attachments/files/19539756/error_0331.txt) Which includes this file printed to disk: [printed_file.tar.gz](https://github.com/user-attachments/files/19539810/printed_file.tar.gz) @wsmoses