|
76 | 76 | # Let's generate auto-allocating versions of all our functions, for all backends. |
77 | 77 | # We `@timeit` these methods separately, as we want to know how much time is spent in |
78 | 78 | # allocation. :P |
79 | | -for backend in (Symbol(), :_direct, :_im2col, :_nnpack) |
| 79 | +for backend in (Symbol(), :_direct, :_im2col) |
80 | 80 | # First make auto-allocating versions of the conv()-like calls: |
81 | 81 | for name in (:conv, :depthwiseconv) |
82 | 82 | @eval begin |
|
134 | 134 | # since we can specialize on sizes. |
135 | 135 | for front_name in (:conv, :∇conv_data, :∇conv_filter, |
136 | 136 | :depthwiseconv, :∇depthwiseconv_data, :∇depthwiseconv_filter) |
137 | | - for backend in (Symbol(), :_direct, :_im2col) ## NNPACK is only for 2d conv |
| 137 | + for backend in (Symbol(), :_direct, :_im2col) |
138 | 138 | for N in (3, 4) |
139 | 139 | @eval begin |
140 | 140 | function $(Symbol("$(front_name)$(backend)!"))( |
@@ -381,26 +381,3 @@ function rrule(::typeof(∇conv_filter), x, dy, cdims; kw...) |
381 | 381 | end |
382 | 382 | return ∇conv_filter(x, dy, cdims; kw...), ∇conv_filter_pullback |
383 | 383 | end |
384 | | - |
385 | | -# Use NNPACK if it is available and the operation is supported |
386 | | -# commented out 'till proper benchmarking and more correctness test are performed |
387 | | -# if is_nnpack_available() |
388 | | -# function conv(x::Array{Float32, 4}, w::Array{Float32, 4}, |
389 | | -# cdims::DenseConvDims{2, K, C_in, C_out, (1, 1), P, (1, 1), F}; |
390 | | -# kwargs...) where {K, C_in, C_out, P, F} |
391 | | -# return conv_nnpack(x, w, cdims; kwargs...) |
392 | | -# end |
393 | | - |
394 | | -# function ∇conv_data(dy::Array{Float32, 4}, w::Array{Float32, 4}, |
395 | | -# cdims::DenseConvDims{2, K, C_in, C_out, (1, 1), P, (1, 1), F}; |
396 | | -# kwargs...) where {K, C_in, C_out, P, F} |
397 | | -# return ∇conv_data_nnpack(dy, w, cdims; kwargs...) |
398 | | -# end |
399 | | - |
400 | | -# function ∇conv_filter(x::Array{Float32, 4}, dy::Array{Float32, 4}, |
401 | | -# cdims::DenseConvDims{2, K, C_in, C_out, (1, 1), P, (1, 1), F}; |
402 | | -# kwargs...) where {K, C_in, C_out, P, F} |
403 | | -# return ∇conv_filter_nnpack(x, dy, cdims; kwargs...) |
404 | | -# end |
405 | | -# end |
406 | | -######################################################## |
0 commit comments