fo40225 / tensorflow-windows-wheel

Tensorflow prebuilt binary for Windows
3.66k stars 1.53k forks source link

How to reduce the size of tensorflow.dll #177

Open wang002 opened 3 years ago

wang002 commented 3 years ago

I built a dll, it is very big, about 600M.I found that the dll you built is very small.

fo40225 commented 3 years ago

How did you build the dll? Which dll are you comparing with?

Fannhhyy commented 3 years ago

https://github.com/sitting-duck/stuff/tree/master/ai/tensorflow/build_tensorflow_1.14_source_for_Windows

Follow this link to build c++ api , tensorflow_cc.dll .lib and include , but only for your own code.

file

This file I built is just for running the pb graph.

fo40225 commented 3 years ago

It seems that the file sizes are similar. Did I misunderstand something?

Fannhhyy commented 3 years ago

When unzip the file, tensorflow_cc.dll is about 600MB , I added sm61,sm75,sm86 . If don't add,the file is about 400MB .

fo40225 commented 3 years ago

If you unzip tensorflow-1.15.4+nv-cp38-cp38-win_amd64.whl, tensorflow_core\python\_pywrap_tensorflow_internal.pyd is 400 MB.

It is the same.

Fannhhyy commented 3 years ago

We tested using tensorflow_cc dll, just inference model, here is the link if needed

https://github.com/Fannhhyy/tensorflow1.15-whl-and-cpp-api-for-win-and-rtx3090