NNlib.jl icon indicating copy to clipboard operation
NNlib.jl copied to clipboard

NNPACK convolution issue

Open Alexander-Barth opened this issue 5 years ago • 0 comments

The convolution with NNPACK do not seem to work reliably. The output of all these convolutions should be zero. Sometimes they are, but sometimes they have a strange value (maybe uninitialized memory)? Is this a known issue?

Thanks

julia> @time extrema(NNlib.conv(zeros(Float32,100,100,10,32),ones(Float32,4,4,10,10)))
  0.044346 seconds (44 allocations: 23.707 MiB)
(0.0f0, 0.0f0)

julia> @time extrema(NNlib.conv(zeros(Float32,100,100,10,32),ones(Float32,4,4,10,10)))
  0.043753 seconds (44 allocations: 23.707 MiB)
(0.0f0, 0.0f0)

julia> @time extrema(NNlib.conv(zeros(Float32,100,100,10,32),ones(Float32,4,4,10,20)))
  0.055470 seconds (44 allocations: 35.205 MiB)
(NaN32, NaN32)

julia> @time extrema(NNlib.conv(zeros(Float32,100,100,10,32),ones(Float32,4,4,10,30)))
  0.197568 seconds (144.16 k allocations: 54.368 MiB)
(-0.00033701234f0, 2.953125f0)

julia> NNlib.is_nnpack_available()
true

julia> NNlib.NNPACK_CPU_THREADS
0x0000000000000008

julia> NNlib.libnnpack
"/home/abarth/.julia/dev/NNlib/deps/usr/lib/libnnpack.so"


Alexander-Barth avatar Jun 01 '20 10:06 Alexander-Barth