-
-
Save iwatake2222/3017d9ac3112b27cc9f5011ece993009 to your computer and use it in GitHub Desktop.
# On Git Bash | |
cd path-to-tensorflow | |
git checkout 00cb358ab2e67d0b06a21901ded13c57fd47e673 | |
./tensorflow/lite/tools/make/download_dependencies.sh | |
nano tensorflow/lite/build_def.bzl | |
### | |
# --- a/tensorflow/lite/build_def.bzl | |
# +++ b/tensorflow/lite/build_def.bzl | |
# @@ -159,6 +159,7 @@ def tflite_cc_shared_object( | |
# tf_cc_shared_object( | |
# name = name, | |
# copts = copts, | |
# + features = ["windows_export_all_symbols"], | |
# linkstatic = linkstatic, | |
# linkopts = linkopts + tflite_jni_linkopts(), | |
# framework_so = [], | |
### | |
# On Anaconda Powershell prompt (Miniconda3) | |
conda create -n build_tflite | |
conda activate build_tflite | |
conda install python | |
conda install numpy | |
cd path-to-tensorflow | |
python configure.py | |
bazel build -c opt //tensorflow/lite:tensorflowlite | |
ls ./bazel-bin/tensorflow/lite/tensorflowlite.dll | |
- Windows 10 | |
- Visual Studio 2017 | |
- Bazel | |
- bazel-1.2.1-windows-x86_64.zip | |
- Add path to bazel.exe | |
- Python 3.8.1 (on Miniconda) |
You can refer to this repo. https://github.com/iwatake2222/EdgeTPU_CPP
It's not a minimal one, still I think it's simple enough.Please uncheck (
USE_EDGETPU
) option in cmake-gui when generating MSVC project. Without this option, the project is for pure tensorflow lite, although repo name is "EdgeTPU".
I followed instructions in readme.md of https://github.com/iwatake2222/EdgeTPU_CPP, i can successfully build tensorflowlite.dll
, but there is no tensorflowlite.dll.if.lib
. Do you know why tensorflowlite.dll.if.lib
is missing. Attached is the screen capture showing all files in bazel-bin/tensorflow/lite/
dir.
It's weird, the lib file should be generated automatically.
Did you use the same commit id as my sample? If not, the build script might changed.
By the way, you can actually create the lib file from DLL using dumpbin
and lib
commands in Developer Command Prompt for VS 20xx.
It's weird, the lib file should be generated automatically.
Did you use the same commit id as my sample? If not, the build script might changed.By the way, you can actually create the lib file from DLL using
dumpbin
andlib
commands in Developer Command Prompt for VS 20xx.
- The same commit id was used in my trial.
- The tip of creating lib from dll is so helpful.
Thanks a lot, iwatake!
You can refer to this repo. https://github.com/iwatake2222/EdgeTPU_CPP
It's not a minimal one, still I think it's simple enough.
Please uncheck (
USE_EDGETPU
) option in cmake-gui when generating MSVC project. Without this option, the project is for pure tensorflow lite, although repo name is "EdgeTPU".