NNgen / nngen

NNgen: A Fully-Customizable Hardware Synthesis Compiler for Deep Neural Network
Apache License 2.0
339 stars 46 forks source link

Regression test (pytest) stucks issues found #46

Open hanyong97 opened 2 years ago

hanyong97 commented 2 years ago

I just ran "python3 -m pytest" in nngen/tests directory. Found out that follow test cases make the regression test stucks: "/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_sigmoid_int8_3x3_stride1.py" "/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_sigmoid_int16_3x3_stride1.py" "/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_sigmoid_int32_3x3_stride1.py"

From my finding from "/nngen/nngen/quantizer/conv2d.py" found out that the 'rate' always bigger than 'allowed_rate' and stucks in infinity while loop (never execute line: 174) as the increment of 'rshift_out' do not reduce the overflow issues. image

As the increament of 'rshift_out', the 'rate' and 'num_overflow' increase as shown: image

Please suggest any fixes to solve this issues.

Thanks '