Skip to content

Commit

Permalink
Mask some inner functions to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
SCiarella committed Nov 22, 2024
1 parent 71439c7 commit 6a582de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/boundary_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ apply_bc_temp!(bc::PressureBC, temp, β, t, setup; isright, kwargs...) =
apply_bc_temp_pullback!(bc::PressureBC, φbar, β, t, setup; isright, kwargs...) =
apply_bc_p_pullback!(SymmetricBC(), φbar, β, t, setup; isright, kwargs...)

# COV_EXCL_START
# Wrap a function to return `nothing`, because Enzyme can not handle vector return values.
function enzyme_wrap(
f::Union{typeof(apply_bc_u!),typeof(apply_bc_p!),typeof(apply_bc_temp!)},
Expand Down Expand Up @@ -602,3 +603,4 @@ function EnzymeRules.reverse(
y.dval .= x.dval # y is a copy of x
return (nothing, nothing, nothing, nothing)
end
# COV_EXCL_STOP
2 changes: 2 additions & 0 deletions src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ function get_scale_numbers(u, setup)
(; uavg, ϵ, η, λ, Reλ, L, τ)
end

# COV_EXCL_START
# Wrap a function to return `nothing`, because Enzyme can not handle vector return values.
function enzyme_wrap(
f::Union{
Expand Down Expand Up @@ -1753,3 +1754,4 @@ function EnzymeRules.reverse(
)
@error "momentum Enzyme-AD not yet implemented"
end
# COV_EXCL_STOP
2 changes: 2 additions & 0 deletions src/pressure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ function psolver_spectral(setup)
end
end

# COV_EXCL_START
# Wrap a function to return `nothing`, because Enzyme can not handle vector return values.
function enzyme_wrap(f::typeof(poisson!))
function wrapped_f(p, psolve, d)
Expand Down Expand Up @@ -393,3 +394,4 @@ function EnzymeRules.reverse(
EnzymeCore.make_zero!(y.dval)
return (nothing, nothing, nothing)
end
# COV_EXCL_STOP
2 changes: 2 additions & 0 deletions src/sciml.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function right_hand_side!(dudt, u, params_ref, t)
return nothing
end

# COV_EXCL_START
function EnzymeRules.augmented_primal(
config::RevConfigWidth{1},
func::Const{typeof(right_hand_side!)},
Expand Down Expand Up @@ -109,3 +110,4 @@ function EnzymeRules.reverse(

return (nothing, nothing, nothing, nothing)
end
# COV_EXCL_STOP

0 comments on commit 6a582de

Please sign in to comment.