NNlib.jl
NNlib.jl copied to clipboard
NNPACK convolution issue
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"