Skip to content

Commit 5315d12

Browse files
committed
rm debug statements, to help tests
1 parent 5cd7fc1 commit 5315d12

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/compiler/chainrules.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function (s::ZBack)(dy)
8686
map(dxs) do dx
8787
ptr = _pointer(dx)
8888
if ptr !== nothing && count(isequal(ptr), ptrs) > 1
89-
@debug "wrapping for chainrules" summary(dy) ptr
89+
# @debug "wrapping for chainrules" summary(dy) ptr
9090
_protect(dx)
9191
else
9292
dx

src/lib/protect.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _pointer(A) = nothing # compares == self
4646

4747
@inline function (s::ZBack)(dy::NoWrite)
4848
ptr_orig = _pointer(dy.data)
49-
@debug "unwrapping for chainrules" summary(dy.data) ptr s.back
49+
# @debug "unwrapping for chainrules" summary(dy.data) ptr s.back
5050
dxs = wrap_chainrules_output(s.back(wrap_chainrules_input(dy.data)))
5151
dxs === nothing && return
5252
ptrs = map(_pointer, dxs)
@@ -55,10 +55,10 @@ _pointer(A) = nothing # compares == self
5555
if ptr === nothing
5656
dx
5757
elseif ptr == ptr_orig
58-
@debug "re-wrapping for chainrules" summary(dy.data) ptr
58+
# @debug "re-wrapping for chainrules" summary(dy.data) ptr
5959
_protect(dx)
6060
elseif count(isequal(ptr), ptrs) > 1
61-
@debug "wrapping for chainrules" summary(dy.data) ptr
61+
# @debug "wrapping for chainrules" summary(dy.data) ptr
6262
_protect(dx)
6363
else
6464
dx
@@ -98,7 +98,7 @@ LinearAlgebra.generic_matvecmul!(C::AbstractVector, tA, A::AbstractVecOrMat, B::
9898
LinearAlgebra.generic_matvecmul!(C::AbstractVector, tA, A::NoWriteVecOrMat, B::NoWriteVector, _add::LinearAlgebra.MulAddMul) = _mulv(C, tA, A, B, _add)
9999

100100
function _mulv(C, tA, A, B, _add)
101-
@debug "generic matrix-vector due to NoWrite" summary(A) summary(B)
101+
# @debug "generic matrix-vector due to NoWrite" summary(A) summary(B)
102102
invoke(LinearAlgebra.generic_matvecmul!, Tuple{AbstractVector, Any, AbstractVecOrMat, AbstractVector, LinearAlgebra.MulAddMul}, C, tA, A, B, _add)
103103
end
104104

@@ -107,7 +107,7 @@ LinearAlgebra.generic_matmatmul!(C::AbstractMatrix, tA, A::AbstractMatrix, B::No
107107
LinearAlgebra.generic_matmatmul!(C::AbstractMatrix, tA, A::NoWriteMatrix, B::NoWriteMatrix, _add::LinearAlgebra.MulAddMul) = _mulm(C, tA, A, B, _add)
108108

109109
function _mulm(C, tA, A, B, _add)
110-
@debug "generic matrix-matrix multiplication due to NoWrite" summary(A) summary(B)
110+
# @debug "generic matrix-matrix multiplication due to NoWrite" summary(A) summary(B)
111111
invoke(LinearAlgebra.generic_matmatmul!, Tuple{AbstractMatrix, Any, AbstractMatrix, AbstractMatrix, LinearAlgebra.MulAddMul}, C, tA, A, B, _add)
112112
end
113113

0 commit comments

Comments
 (0)