Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using AbstractFloat instead of Float64 in warning check for slow conv #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ for (front_name, backend, signature) in (
in2::AbstractArray{$(signature[3][1]), $(signature[1][2])},
cdims::$(signature[4]);
kwargs...) where {$(signature[5]...)}
if $(string(backend)) == "direct" && yT == Float64 # warn for Float32 + accidental Float64, but don't print warning for ForwardDiff.Dual
if $(string(backend)) == "direct" && yT <: AbstractFloat # warn for accidental mixture of floats, but don't print warning for ForwardDiff.Dual
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
"You probably don't want this; check your datatypes.") yT T1 T2 maxlog=1
end
Expand Down Expand Up @@ -229,7 +229,7 @@ for (front_name, backend, signature) in (
in2::AbstractArray{$(signature[3][1]), $(signature[1][2])},
cdims::$(signature[4]);
kwargs...) where {$(signature[5]...)}
if $(string(backend)) == "direct" && yT == Float64 # warn for Float32 + accidental Float64, but don't print warning for ForwardDiff.Dual
if $(string(backend)) == "direct" && yT <: AbstractFloat # warn for accidental mixture of floats, but don't print warning for ForwardDiff.Dual
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
"You probably don't want this; check your datatypes.") yT T1 T2 maxlog=1
end
Expand Down Expand Up @@ -272,7 +272,7 @@ for (front_name, backend, signature) in (
in2::AbstractArray{$(signature[3][1]), $(signature[1][2])},
cdims::$(signature[4]);
kwargs...) where {$(signature[5]...)}
if $(string(backend)) == "direct" && yT == Float64 # warn for Float32 + accidental Float64, but don't print warning for ForwardDiff.Dual
if $(string(backend)) == "direct" && yT <: AbstractFloat # warn for accidental mixture of floats, but don't print warning for ForwardDiff.Dual
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
"You probably don't want this; check your datatypes.") yT T1 T2 maxlog=1
end
Expand Down Expand Up @@ -323,7 +323,7 @@ for (front_name, backend, signature) in (
in2::AbstractArray{$(signature[3][1]), $(signature[1][2])},
cdims::$(signature[4]);
kwargs...) where {$(signature[5]...)}
if $(string(backend)) == "direct" && yT == Float64 # warn for Float32 + accidental Float64, but don't print warning for ForwardDiff.Dual
if $(string(backend)) == "direct" && yT <: AbstractFloat # warn for accidental mixture of floats, but don't print warning for ForwardDiff.Dual
@warn string("Slow fallback implementation invoked for ", $(string(front_name)), "! ",
"You probably don't want this; check your datatypes.") yT T1 T2 maxlog=1
end
Expand Down