Skip to content

Commit 776cb22

Browse files
author
Avik Pal
committed
Remove timer outputs as they mess with type inference
1 parent f5fce7a commit 776cb22

File tree

5 files changed

+7
-23
lines changed

5 files changed

+7
-23
lines changed

Manifest.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ git-tree-sha1 = "055eb2690182ebc31087859c3dd8598371d3ef9e"
99
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
1010
version = "0.5.3"
1111

12-
[[Crayons]]
13-
deps = ["Test"]
14-
git-tree-sha1 = "f621b8ef51fd2004c7cf157ea47f027fdeac5523"
15-
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
16-
version = "4.0.0"
17-
1812
[[Dates]]
1913
deps = ["Printf"]
2014
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -87,12 +81,6 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
8781
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
8882
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8983

90-
[[TimerOutputs]]
91-
deps = ["Crayons", "Printf", "Test", "Unicode"]
92-
git-tree-sha1 = "b80671c06f8f8bae08c55d67b5ce292c5ae2660c"
93-
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
94-
version = "0.5.0"
95-
9684
[[UUIDs]]
9785
deps = ["Random", "SHA"]
9886
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1010
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
11-
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
1211

1312
[extras]
1413
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/NNlib.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module NNlib
22
using Requires, TimerOutputs
33

4-
const to = TimerOutput()
5-
6-
74
# Include APIs
85
include("dim_helpers.jl")
96

src/conv.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ for (front_name, backend) in (
4545
# We only define 3d conv primitives, we reshape lower down to get 1d and 2d convolution
4646
@eval begin
4747
# im2col-accelerated function forwarding definition
48-
@timeit_debug to function $(Symbol("$(front_name)!"))(
48+
function $(Symbol("$(front_name)!"))(
4949
out::AbstractArray{T,5}, in1::AbstractArray{T,5},
5050
in2::AbstractArray{T,5}, cdims::ConvDims; kwargs...) where {T <: $G}
5151
$(Symbol("$(front_name)_$(backend)!"))(out, in1, in2, cdims; kwargs...)
@@ -106,7 +106,7 @@ for backend in (Symbol(), :_direct, :_im2col)
106106
# First make auto-allocating versions of the conv()-like calls:
107107
for name in (:conv, :depthwiseconv)
108108
@eval begin
109-
@timeit_debug to function $(Symbol("$(name)$(backend)"))(
109+
function $(Symbol("$(name)$(backend)"))(
110110
x::AbstractArray{xT,N}, w::AbstractArray{wT,N},
111111
cdims::ConvDims; kwargs...) where {xT, wT, N}
112112
y = similar(x, promote_type(xT, wT), output_size(cdims)...,
@@ -118,7 +118,7 @@ for backend in (Symbol(), :_direct, :_im2col)
118118

119119
for name in (:∇conv_data, :∇depthwiseconv_data)
120120
@eval begin
121-
@timeit_debug to function $(Symbol("$(name)$(backend)"))(
121+
function $(Symbol("$(name)$(backend)"))(
122122
dy::AbstractArray{yT,N}, w::AbstractArray{wT,N},
123123
cdims::ConvDims; kwargs...) where {yT, wT, N}
124124
dx = similar(dy, input_size(cdims)..., channels_in(cdims),
@@ -131,7 +131,7 @@ for backend in (Symbol(), :_direct, :_im2col)
131131
# We do the conv/depthwiseconv filter backprops separately, as the shape calculation
132132
# for `w` is slightly different for depthwise than for normal dense convolution.
133133
@eval begin
134-
@timeit_debug to function $(Symbol("∇conv_filter$(backend)"))(
134+
function $(Symbol("∇conv_filter$(backend)"))(
135135
x::AbstractArray{xT,N}, dy::AbstractArray{yT,N},
136136
cdims::ConvDims; kwargs...) where {xT, yT, N}
137137
dw = similar(dy, kernel_size(cdims)..., channels_in(cdims),
@@ -141,7 +141,7 @@ for backend in (Symbol(), :_direct, :_im2col)
141141
end
142142

143143
@eval begin
144-
@timeit_debug to function $(Symbol("∇depthwiseconv_filter$(backend)"))(
144+
function $(Symbol("∇depthwiseconv_filter$(backend)"))(
145145
x::AbstractArray{xT,N}, dy::AbstractArray{yT,N},
146146
cdims::ConvDims; kwargs...) where {xT, yT, N}
147147
dw = similar(dy, kernel_size(cdims)..., channel_multiplier(cdims),

src/pooling.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ for backend in (Symbol(), :_direct, :_im2col)
107107
# First make auto-allocating versions of the basic pooling calls:
108108
for name in (:maxpool, :meanpool)
109109
@eval begin
110-
@timeit_debug to function $(Symbol("$(name)$(backend)"))(
110+
function $(Symbol("$(name)$(backend)"))(
111111
x::AbstractArray{xT,N},
112112
pdims::PoolDims; kwargs...) where {xT, N}
113113
y = similar(x, output_size(pdims)..., channels_out(pdims), size(x, N))
@@ -116,7 +116,7 @@ for backend in (Symbol(), :_direct, :_im2col)
116116
end
117117

118118
# Backprops too
119-
@timeit_debug to function $(Symbol("$(name)$(backend)"))(
119+
function $(Symbol("$(name)$(backend)"))(
120120
dy::AbstractArray{T,N}, y::AbstractArray{T,N},
121121
x::AbstractArray{T,N}, pdims::PoolDims;
122122
kwargs...) where {T, N}

0 commit comments

Comments
 (0)