Skip to content

Commit 36010e4

Browse files
author
Dhairya Gandhi
committed
add return types annotations
1 parent daa862a commit 36010e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/nnpack/impl.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ end
77

88
function conv_nnpack!(y::A1, x::A1, w::A1, cdims::ConvDims;
99
b::A2 = zeros(Float32, size(x, 3)),
10-
algo = UInt32(0)) where {A1<:Array{Float32, 4},
10+
algo = UInt32(0))::A1 where {A1<:Array{Float32, 4},
1111
A2<:Array{Float32, 1}}
1212
check_dims(size(x), size(w), size(y), cdims)
1313
threadpool = select_threadpool(cdims, size(y, 4))
@@ -21,7 +21,7 @@ function conv_nnpack!(y::A1, x::A1, w::A1, cdims::ConvDims;
2121
end
2222

2323
function ∇conv_data_nnpack!(dx::A, dy::A, w::A, cdims::ConvDims;
24-
algo = UInt32(0)) where{A<:Array{Float32, 4}}
24+
algo = UInt32(0))::A where{A<:Array{Float32, 4}}
2525
check_dims(size(dx), size(w), size(dy), cdims)
2626
threadpool = select_threadpool(cdims, size(y, 4))
2727

@@ -34,7 +34,7 @@ function ∇conv_data_nnpack!(dx::A, dy::A, w::A, cdims::ConvDims;
3434
end
3535

3636
function ∇conv_filter_nnpack!(dw::A, x::A, dy::A, cdims::ConvDims;
37-
algo = UInt32(0)) where{A<:Array{Float32, 4}}
37+
algo = UInt32(0))::A where{A<:Array{Float32, 4}}
3838
check_dims(size(x), size(dw), size(dy), cdims)
3939
threadpool = select_threadpool(cdims, size(y, 4))
4040

src/nnpack/interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for (front_name, backend) in (
1919
end
2020

2121

22-
function conv_nnpack(x::Array{T1, 4}, w::Array{T2, 4}, cdims::ConvDims; kwargs...) where {T1, T2}
22+
function conv_nnpack(x::Array{T1, 4}, w::Array{T2, 4}, cdims::ConvDims; kwargs...)::Array{Float32,4} where {T1, T2}
2323
y = similar(x, output_size(cdims)..., channels_out(cdims), size(x, 4))
2424
return conv_nnpack!(y, x, w, cdims; kwargs...)
2525
end

0 commit comments

Comments
 (0)