danielholanda / LeFlow

Enabling Flexible FPGA High-Level Synthesis of Tensorflow Deep Neural Networks
Other
584 stars 101 forks source link

Issues with generating Verilog for some complex examples #34

Closed SumantSakhalkar closed 4 years ago

SumantSakhalkar commented 4 years ago

Hi Daniel,

Thank you for the wonderful and interesting project. Been planning to work on this project for the summer. I had a few issues with the installation for TensorFlow 1.6.0

Tried using the following command to install from the wheel file provided in /src/tensorflow.

sudo pip install tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl --ignore-installed six

However, I was getting the following error or warning:

Installing collected packages: termcolor, six, setuptools, protobuf,
werkzeug, numpy, html5lib, bleach, futures, wheel, markdown,
tensorboard, enum34, absl-py, gast, funcsigs, mock, astor, grpcio,
backports.weakref, tensorflow
Successfully installed absl-py-0.9.0 astor-0.8.1
backports.weakref-1.0.post1 bleach-1.5.0 enum34-1.1.10 funcsigs-1.0.2
futures-3.3.0 gast-0.3.3 grpcio-1.29.0 html5lib-0.9999999
markdown-3.1.1 mock-3.0.5 numpy-1.16.6 protobuf-3.12.2
setuptools-44.1.1 six-1.15.0 tensorboard-1.6.0 tensorflow-1.6.0
termcolor-1.1.0 werkzeug-1.0.1 wheel-0.34.2
/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:139:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. You can upgrade to a newer version of
Python to solve this. For more information, see
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning,

I assumed it was a warning so I went ahead with the testing. I was also successful in testing the installation by running.

python test_all.py --fast

All tests yielded correct results. I tried generating hardware for classificationMNIST and it also gave me all the desired outputs.

So I then tried to generate the hardware for convolutionLenna and it gave me the following error:

INFO: Creating project...
INFO: Cleaning previous files...
INFO: Generating IR from tensorflow...
INFO: Cleaning unused dumped files...
Traceback (most recent call last):
  File "../../src/LeFlow", line 200, in <module>
    run_leflow(args.file_name,tool_path)
  File "../../src/LeFlow", line 79, in run_leflow
    shutil.copy(project_folder+"ir/ir-cluster_0__XlaCompiledKernel_true__XlaNumConstantArgs_0__XlaNumResourceArgs_0__module-with-opt.ll",project_folder+project_name+"_ir_1.ll")
  File "/usr/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory:
'convolutionLe_files/ir/ir-cluster_0__XlaCompiledKernel_true__XlaNumConstantArgs_0__XlaNumResourceArgs_0__module-with-opt.ll'
legup@legup-vm:~/LeFlow/examples/convolutionLenna$ ../../src/LeFlow
convolutionLenna.py

Is there a problem with the installation of TensorFlow? I looked into the other issues that were having the same problem but I wasn't able to pinpoint my problem. Any help on this would be highly appreciated.

P.S. I tried the old version of TensorFlow mentioned in a few of the issues too but got the same result. I also looked into similar issues online and there were a couple which I tried and failed like installing pyOpenSSL ndg-httpsclient pyasn1. I also tried re-installing the requests package but gave the same issues while installing TensorFlow. There was one other option of installing python 2.7.9 but haven't tried it yet.