From 954cddfbeab7d0b0f112c8febad0253de79990fa Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:12:33 -0500 Subject: [PATCH 1/4] Update conv.jl --- src/conv.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conv.jl b/src/conv.jl index fead2ee2..a8674920 100644 --- a/src/conv.jl +++ b/src/conv.jl @@ -343,8 +343,8 @@ for conv in [:conv, :depthwiseconv] conv_pullback, ∇conv_data_pullback = Symbol.([conv, ∇conv_data], :_pullback) @eval function rrule(::typeof($conv), x, w, cdims; kw...) - function $conv_pullback(Δ) - Δ = colmajor(Δ) + function $conv_pullback(Δraw) + Δ = colmajor(unthunk(Δraw)) return ( NoTangent(), @thunk($∇conv_data(unthunk(Δ), w, cdims, kw...)), @@ -356,8 +356,8 @@ for conv in [:conv, :depthwiseconv] end @eval function rrule(::typeof($∇conv_data), x, w, cdims; kw...) - function $∇conv_data_pullback(Δ) - Δ = colmajor(Δ) + function $∇conv_data_pullback(Δraw) + Δ = colmajor(unthunk(Δraw)) return ( NoTangent(), @thunk($conv(unthunk(Δ), w, cdims, kw...)), From bdf3703da21e0d4e4e8d4e873d7fa591ddb193e2 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:24:14 -0500 Subject: [PATCH 2/4] Apply suggestions from code review --- src/conv.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conv.jl b/src/conv.jl index a8674920..40258f86 100644 --- a/src/conv.jl +++ b/src/conv.jl @@ -347,7 +347,7 @@ for conv in [:conv, :depthwiseconv] Δ = colmajor(unthunk(Δraw)) return ( NoTangent(), - @thunk($∇conv_data(unthunk(Δ), w, cdims, kw...)), + @thunk($∇conv_data(Δ, w, cdims, kw...)), @thunk($∇conv_filter(x, unthunk(Δ), cdims, kw...)), NoTangent(), ) @@ -360,7 +360,7 @@ for conv in [:conv, :depthwiseconv] Δ = colmajor(unthunk(Δraw)) return ( NoTangent(), - @thunk($conv(unthunk(Δ), w, cdims, kw...)), + @thunk($conv(Δ, w, cdims, kw...)), @thunk($∇conv_filter(unthunk(Δ), x, cdims, kw...)), NoTangent(), ) From 738af99efe268921169887f3f8535cc02107b921 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:25:06 -0500 Subject: [PATCH 3/4] Apply suggestions from code review --- src/conv.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conv.jl b/src/conv.jl index 40258f86..f4050bdb 100644 --- a/src/conv.jl +++ b/src/conv.jl @@ -348,7 +348,7 @@ for conv in [:conv, :depthwiseconv] return ( NoTangent(), @thunk($∇conv_data(Δ, w, cdims, kw...)), - @thunk($∇conv_filter(x, unthunk(Δ), cdims, kw...)), + @thunk($∇conv_filter(x, Δ, cdims, kw...)), NoTangent(), ) end @@ -361,7 +361,7 @@ for conv in [:conv, :depthwiseconv] return ( NoTangent(), @thunk($conv(Δ, w, cdims, kw...)), - @thunk($∇conv_filter(unthunk(Δ), x, cdims, kw...)), + @thunk($∇conv_filter(Δ, x, cdims, kw...)), NoTangent(), ) end From 21c0aa4fc18cc6fb3cfe067422734b3228f6f1f7 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:25:39 -0500 Subject: [PATCH 4/4] 0.9.27 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0c00aa53..25aac329 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "NNlib" uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.9.26" +version = "0.9.27" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"