deepC
deepC copied to clipboard
operator Conv is crashing likely because of invalid memory read.
Test may not crash on internal machines, it consistently crashes on google colab - a platform we support.
how to reproduce on Colab
!sudo apt-get update
!sudo apt-get install build-essential python3.6-dev python3-pip swig doxygen clang-format clang clang-8 llvm-8 llvm-8-dev
!sudo pip3 install numpy onnx
!git clone https://github.com/ai-techsystems/dnnCompiler
import os
os.chdir('/content/dnnCompiler/')
!make clean; make
os.chdir('/content/dnnCompiler/test')
!python3 run_one.py Conv.py
How to profile using valgrind
make DEBUG=y
cd test
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes python run_one.py Conv.py | & tee val.log
Inspect val.log to find
==26696== Conditional jump or move depends on uninitialised value(s) ... ==26696== Invalid read of size 4
Fixing these leaks locally will likely fix the crash in colab too.