Skip to content

Commit 07a5284

Browse files
mcabbottdarsnack
andauthored
Silence some warnings (#383)
* quieten some warnings * warn only on promotion to Float64 Co-authored-by: Kyle Daruwalla <[email protected]> Co-authored-by: Kyle Daruwalla <[email protected]>
1 parent fd1b939 commit 07a5284

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/conv.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ for front_name in (:conv, :∇conv_data, :∇conv_filter,
285285
y::AbstractArray{yT,N}, in1::AbstractArray{T1,N},
286286
in2::AbstractArray{T2,N}, cdims::ConvDims;
287287
kwargs...) where {yT, T1, T2, N}
288-
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
288+
if yT == Float64 # warn for Float32 + accidental Float64, but don't print warning for ForwardDiff.Dual
289+
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
289290
"You probably don't want this; check your datatypes.") yT T1 T2 maxlog=1
291+
end
290292
$(Symbol("$(front_name)_direct!"))(y, in1, in2, cdims; kwargs...)
291293
end
292294
end

0 commit comments

Comments
 (0)