Skip to content

Commit 4d4f0d2

Browse files
rrajoreynimmagacavusmustafamohdansxsspintel
authored
Pre gold dev (openvinotoolkit#128)
* Added support for OneDNN FusedBatchNormEx and FusedConV2D (openvinotoolkit#112) * Added support for OneDNN FusedBatchNormEx and FusedConV2D * Code formating Co-authored-by: Cavus Mustafa <mustafa.cavus@intel.com> * FusedDepthwiseConv2d and improved FusedConv2D support (openvinotoolkit#114) * Upgradation of TensorFlow version to v2.5.0 (openvinotoolkit#111) * patch updated for TFv2.5.0 * added math_op to skip list for gpu * TFv2.5.0 setup for builds and defaults * changed tf build location in ci * change abi1 tf links, add docker tf pip whls build patch Co-authored-by: Suryaprakash Shanmugam <suryaprakash.shanmugam@intel.com> * Lazy Fallback (Support for Dynamic Fallback) (openvinotoolkit#113) * Initial implementation of dynamic fallback * Error check fix for dynamic fallback * Improved coverage for dynamic fallback * Code formating for dynamic fallback updates * dyn fb bugfix & dyn fb disabled by default * Fixed python api typo * Code cleanup in executable.cc * Code formating for dynamic fallback updates * tf 1.x support for dyn. fallback * Code formatting * Fix for freezing inf. with dyn. fb. when interop is 1 * memory leak fixes (openvinotoolkit#110) * memory leak fixes and adding more user options * fix flag options and code format * OCM submodule updated for fused ops (openvinotoolkit#115) * Updated code for some checks (openvinotoolkit#104) * checkmarx code fixes * checkmarx fix * checkmarx code fix * code format fix * Update build_utils.py * code format fix * add suggested checks (openvinotoolkit#119) * checks in py files * added exception catching for assert statement * fixed uninitialized variable issue (openvinotoolkit#120) * Aditya/doc update (openvinotoolkit#123) * installing opecv during venv setup * typo fix and removed opencv installation manually * Adding azure pipelines using docker (openvinotoolkit#122) * Removed shell as True with subprocess pipe (openvinotoolkit#127) * removed shell=True with subprocess pipe * applied code format * Initial TROUBLESHOOTING.md and updates on ARCHITECTURE.md (openvinotoolkit#126) * GUIDE document added, ARCHITECTURE updated for dyn. fb. * Filename change: GUIDE.md to TROUBLESHOOTING.md * AWS, Azure and Colab classification notebook added (openvinotoolkit#125) * AWS, Azure and Colab classification notebook added * colab notebook added for object detection * fixing path traversal issues (openvinotoolkit#129) Co-authored-by: Yamini Nimmagadda <yamini.nimmagadda@intel.com> Co-authored-by: Cavus Mustafa <mustafa.cavus@intel.com> Co-authored-by: mohdansx <mohdx.ansari@intel.com> Co-authored-by: Suryaprakash Shanmugam <suryaprakash.shanmugam@intel.com> Co-authored-by: Sai Jayanthi <sai.jayanthi@intel.com> Co-authored-by: Chandrakant Khandelwal <chandrakant.khandelwal@intel.com> Co-authored-by: adisan3 <adityax.sanivarapu@intel.com> Co-authored-by: bhadur <bhadur.a.sm@intel.com> Co-authored-by: Ambarish Das <ambarish.das@intel.com>
1 parent 37a2e5b commit 4d4f0d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3248
-271
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This repository contains the source code of **OpenVINO™ integration with Tenso
1717

1818
- Ubuntu 18.04, 20.04
1919
- Python 3.6, 3.7, or 3.8
20-
- TensorFlow v2.4.1
20+
- TensorFlow v2.5.0
2121

2222
Check our [Interactive Installation Table](https://openvinotoolkit.github.io/openvino_tensorflow/) for a menu of installation options. The table will help you configure the installation process.
2323

@@ -30,7 +30,7 @@ This **OpenVINO™ integration with TensorFlow** package comes with pre-built li
3030

3131

3232
pip3 install -U pip==21.0.1
33-
pip3 install -U tensorflow==2.4.1
33+
pip3 install -U tensorflow==2.5.0
3434
pip3 install openvino-tensorflow
3535

3636

@@ -49,10 +49,10 @@ To see if **OpenVINO™ integration with TensorFlow** is properly installed, run
4949

5050
This should produce an output like:
5151

52-
TensorFlow version: 2.4.1
52+
TensorFlow version: 2.5.0
5353
OpenVINO integration with TensorFlow version: b'0.5.0'
5454
OpenVINO version used for this build: b'2021.3'
55-
TensorFlow version used for this build: v2.4.1
55+
TensorFlow version used for this build: v2.5.0
5656
CXX11_ABI flag used for this build: 0
5757
OpenVINO integration with TensorFlow built with Grappler: False
5858

build_ov.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ def main():
3838

3939
if not os.path.isdir(arguments.output_dir):
4040
os.makedirs(arguments.output_dir)
41+
assert os.path.exists(
42+
arguments.output_dir), "path doesn't exist {0}".format(
43+
arguments.output_dir)
4144
os.chdir(arguments.output_dir)
42-
45+
assert os.path.exists(
46+
arguments.output_dir), "Directory doesn't exist {0}".format(
47+
arguments.output_dir)
4348
if not os.path.isdir(os.path.join(arguments.output_dir, "openvino")):
4449
# Download OpenVINO
4550
download_repo(
@@ -49,12 +54,19 @@ def main():
4954
submodule_update=True)
5055
else:
5156
pwd = os.getcwd()
57+
assert os.path.exists(
58+
arguments.output_dir), "path doesn't exist {0}".format(
59+
arguments.output_dir)
5260
os.chdir(os.path.join(arguments.output_dir, "openvino"))
5361
call(["git", "fetch"])
5462
command_executor(["git", "checkout", openvino_version])
5563
call(["git", "pull"])
64+
assert os.path.exists(pwd), "Path doesn't exist {0}".format(pwd)
5665
os.chdir(pwd)
57-
66+
assert os.path.exists(
67+
os.path.join(arguments.output_dir,
68+
"openvino")), "Path doesn't exist {0}/openvino".format(
69+
arguments.output_dir)
5870
openvino_src_dir = os.path.join(arguments.output_dir, "openvino")
5971
print("OV_SRC_DIR: ", openvino_src_dir)
6072

build_ovtf.py

+28-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main():
4545
'''
4646

4747
# Component versions
48-
tf_version = "v2.4.1"
48+
tf_version = "v2.5.0"
4949
ovtf_version = "v0.5.0"
5050
use_intel_tf = False
5151

@@ -193,6 +193,8 @@ def main():
193193
if arguments.use_openvino_from_location != '':
194194
ver_file = arguments.use_openvino_from_location + \
195195
'/deployment_tools/inference_engine/version.txt'
196+
assert os.path.exists(ver_file), "Path doesn't exist {0}".format(
197+
ver_file)
196198
with open(ver_file) as f:
197199
line = f.readline()
198200
assert line.find(arguments.openvino_version) != -1, "OpenVINO version " + \
@@ -214,6 +216,7 @@ def main():
214216
found_whl = False
215217
found_libtf_fw = False
216218
found_libtf_cc = False
219+
assert os.path.exists(loc), "Path doesn't exist {0}".format(loc)
217220
for i in os.listdir(loc):
218221
if '.whl' in i:
219222
found_whl = True
@@ -235,6 +238,8 @@ def main():
235238
openvino_tf_src_dir = os.path.abspath(pwd)
236239
print("OVTF SRC DIR: " + openvino_tf_src_dir)
237240
build_dir_abs = os.path.abspath(build_dir)
241+
assert os.path.exists(build_dir_abs), "Directory doesn't exist {}".format(
242+
build_dir_abs)
238243
os.chdir(build_dir)
239244

240245
venv_dir = 'venv-tf-py3'
@@ -280,6 +285,8 @@ def main():
280285
# The tf whl should be in use_tensorflow_from_location/artifacts/tensorflow
281286
tf_whl_loc = os.path.abspath(arguments.use_tensorflow_from_location +
282287
'/artifacts/tensorflow')
288+
assert os.path.exists(tf_whl_loc), "path doesn't exist {0}".format(
289+
tf_whl_loc)
283290
possible_whl = [i for i in os.listdir(tf_whl_loc) if '.whl' in i]
284291
assert len(
285292
possible_whl
@@ -296,6 +303,8 @@ def main():
296303
"use_tensorflow_from_location are incompatible")
297304

298305
cwd = os.getcwd()
306+
assert os.path.exists(tf_whl_loc), "Path doesn't exist {0}".format(
307+
tf_whl_loc)
299308
os.chdir(tf_whl_loc)
300309
tf_in_artifacts = os.path.join(
301310
os.path.abspath(artifacts_location), "tensorflow")
@@ -307,6 +316,7 @@ def main():
307316
tf_version = get_tf_version()
308317
copy_tf_to_artifacts(tf_version, tf_in_artifacts, tf_whl_loc,
309318
use_intel_tf)
319+
assert os.path.exists(cwd), "Path doesn't exist {0}".format(cwd)
310320
os.chdir(cwd)
311321
else:
312322
if not arguments.build_tf_from_source:
@@ -322,17 +332,17 @@ def main():
322332
if tags.interpreter == "cp36":
323333
command_executor([
324334
"pip", "install",
325-
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp36-cp36m-manylinux2010_x86_64.whl"
335+
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp36-cp36m-manylinux2010_x86_64.whl"
326336
])
327337
if tags.interpreter == "cp37":
328338
command_executor([
329339
"pip", "install",
330-
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp37-cp37m-manylinux2010_x86_64.whl"
340+
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp37-cp37m-manylinux2010_x86_64.whl"
331341
])
332342
if tags.interpreter == "cp38":
333343
command_executor([
334344
"pip", "install",
335-
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp38-cp38-manylinux2010_x86_64.whl"
345+
"https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp38-cp38-manylinux2010_x86_64.whl"
336346
])
337347

338348
# ABI 1 TF required latest numpy
@@ -348,11 +358,16 @@ def main():
348358
print("TF_SRC_DIR: ", tf_src_dir)
349359
# Download TF source for enabling TF python tests
350360
pwd_now = os.getcwd()
361+
assert os.path.exists(
362+
artifacts_location), "Path doesn't exist {0}".format(
363+
artifacts_location)
351364
os.chdir(artifacts_location)
352365
print("DOWNLOADING TF: PWD", os.getcwd())
353366
download_repo("tensorflow",
354367
"https://github.com/tensorflow/tensorflow.git",
355368
tf_version)
369+
assert os.path.exists(pwd_now), "Path doesn't exist {0}".format(
370+
pwd_now)
356371
os.chdir(pwd_now)
357372
# Finally, copy the libtensorflow_framework.so to the artifacts
358373
if (tf_version.startswith("v1.") or (tf_version.startswith("1."))):
@@ -366,6 +381,8 @@ def main():
366381
tf_lib_file = os.path.join(tf_lib_dir, tf_fmwk_lib_name)
367382
print("SYSCFG LIB: ", tf_lib_file)
368383
dst_dir = os.path.join(artifacts_location, "tensorflow")
384+
assert os.path.exists(
385+
dst_dir), "Directory doesn't exist {0}".format(dst_dir)
369386
if not os.path.isdir(dst_dir):
370387
os.mkdir(dst_dir)
371388
dst = os.path.join(dst_dir, tf_fmwk_lib_name)
@@ -493,6 +510,11 @@ def main():
493510
openvino_tf_cmake_flags, verbosity)
494511

495512
# Make sure that the openvino_tensorflow whl is present in the artfacts directory
513+
assert os.path.exists(artifacts_location), "Path not found {}".format(
514+
artifacts_location)
515+
assert os.path.isfile(os.path.join(
516+
artifacts_location,
517+
ov_tf_whl)), "Cannot locate nGraph whl in the artifacts location"
496518
if not os.path.isfile(os.path.join(artifacts_location, ov_tf_whl)):
497519
raise Exception("Cannot locate nGraph whl in the artifacts location")
498520

@@ -534,6 +556,8 @@ def main():
534556
command_executor(['ln', '-sf', link_src, link_dst], verbose=True)
535557

536558
# Run a quick test
559+
assert os.path.exists(artifacts_location), "Path doesn't exist {}".format(
560+
artifacts_location)
537561
install_openvino_tf(tf_version, venv_dir,
538562
os.path.join(artifacts_location, ov_tf_whl))
539563

build_tf.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def main():
1919
type=str,
2020
help="TensorFlow tag/branch/SHA\n",
2121
action="store",
22-
default="v2.4.1")
22+
default="v2.5.0")
2323
parser.add_argument(
2424
'--output_dir',
2525
type=str,
@@ -50,26 +50,34 @@ def main():
5050

5151
assert os.path.isdir(arguments.output_dir), \
5252
"Did not find output directory: " + arguments.output_dir
53-
53+
assert os.path.exists(
54+
arguments.output_dir), "path doesn't exist {0}".format(
55+
arguments.output_dir)
5456
os.chdir(arguments.output_dir)
5557

5658
venv_dir = './venv3/'
5759

5860
install_virtual_env(venv_dir)
5961
load_venv(venv_dir)
6062
setup_venv(venv_dir)
61-
63+
assert os.path.exists(
64+
arguments.output_dir), "Directory doesn't exist {0}".format(
65+
arguments.output_dir)
6266
if not os.path.isdir(os.path.join(arguments.output_dir, "tensorflow")):
6367
# Download TensorFlow
6468
download_repo("tensorflow",
6569
"https://github.com/tensorflow/tensorflow.git",
6670
arguments.tf_version)
6771
else:
6872
pwd = os.getcwd()
73+
assert os.path.exists(
74+
arguments.output_dir), "Path doesn't exist {}".format(
75+
arguments.output_dir)
6976
os.chdir(os.path.join(arguments.output_dir, "tensorflow"))
7077
call(["git", "fetch"])
7178
command_executor(["git", "checkout", arguments.tf_version])
7279
call(["git", "pull"])
80+
assert os.path.exists(pwd), "Path doesn't exist {0}".format(pwd)
7381
os.chdir(pwd)
7482

7583
# Build TensorFlow

docs/ARCHITECTURE.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ Backend manager creates a backend for the execution of the CNNNetwork. We implem
3636
Basic backend is used for Intel<sup>®</sup> CPUs, Intel<sup>®</sup> integrated GPUs and Intel<sup>®</sup> Movidius™ Vision Processing Units (VPUs). The backend creates an inference request and runs inference on a given input data.
3737

3838
VAD-M backend is used for Intel® Vision Accelerator Design with 8 Intel<sup>®</sup> Movidius™ MyriadX VPUs (referred as VAD-M or HDDL). We support batched inference execution in the VAD-M backend. When the user provides a batched input, multiple inference requests are created and inference is run in parallel on all the available VPUs in the VAD-M.
39+
40+
Backend Manager supports Dynamic Fallback which means if the execution of the corresponding CNNNetwork fails in OpenVINO runtime, the execution fallbacks to stock TensorFlow runtime.

docs/BUILD.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
|Build Type| Requirements|
55
|:-----------------------|-------------------|
6-
|Use pre-built packages| Python 3.6, 3.7, or 3.8, TensorFlow v2.4.1|
6+
|Use pre-built packages| Python 3.6, 3.7, or 3.8, TensorFlow v2.5.0|
77
|Build from source| Python 3.6, 3.7, or 3.8, GCC 7.5 (Ubuntu 18.04, 20.04), cmake 3.14 or higher, Bazelisk v1.7.5, virtualenv 16.0.0 or higher, patchelf 0.9, libusb 1.0.0|
88

99
## Use Pre-Built Packages
@@ -24,7 +24,7 @@ This **OpenVINO™ integration with TensorFlow** package includes pre-built libr
2424

2525

2626
pip3 install -U pip==21.0.1
27-
pip3 install -U tensorflow==2.4.1
27+
pip3 install -U tensorflow==2.5.0
2828
pip3 install openvino-tensorflow
2929

3030
### Install **OpenVINO™ integration with TensorFlow** alongside the Intel® Distribution of OpenVINO™ Toolkit
@@ -40,15 +40,15 @@ You can build TensorFlow from source with -D_GLIBCXX_USE_CXX11_ABI=1 or use the
4040

4141
2. Install `TensorFlow`. Based on your Python version, use the appropriate package below:
4242

43-
pip3.6 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp36-cp36m-manylinux2010_x86_64.whl
43+
pip3.6 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp36-cp36m-manylinux2010_x86_64.whl
4444

4545
or
4646

47-
pip3.7 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp37-cp37m-manylinux2010_x86_64.whl
47+
pip3.7 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp37-cp37m-manylinux2010_x86_64.whl
4848

4949
or
5050

51-
pip3.8 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.5.0/tensorflow_abi1-2.4.1-cp38-cp38-manylinux2010_x86_64.whl
51+
pip3.8 install https://github.com/openvinotoolkit/openvino_tensorflow/releases/download/v0.6.0/tensorflow_abi1-2.5.0-cp38-cp38-manylinux2010_x86_64.whl
5252

5353
3. Download & install Intel® Distribution of OpenVINO™ Toolkit 2021.3 release along with its dependencies from ([https://software.intel.com/en-us/openvino-toolkit/download](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html)).
5454

@@ -142,10 +142,10 @@ Verify that `openvino-tensorflow` is installed correctly:
142142

143143
This should produce an output like:
144144

145-
TensorFlow version: 2.4.1
145+
TensorFlow version: 2.5.0
146146
OpenVINO integration with TensorFlow version: b'0.5.0'
147147
OpenVINO version used for this build: b'2021.3'
148-
TensorFlow version used for this build: v2.4.1
148+
TensorFlow version used for this build: v2.5.0
149149
CXX11_ABI flag used for this build: 1
150150
OpenVINO integration with TensorFlow built with Grappler: False
151151

@@ -181,9 +181,9 @@ TensorFlow can be built from source using `build_tf.py`. The build artifacts can
181181

182182
python3 build_tf.py --output_dir=${PATH_TO_TF_BUILD} --cxx11_abi_version=1
183183

184-
- To build with a desired TF version, for example: v2.4.1
184+
- To build with a desired TF version, for example: v2.5.0
185185

186-
python3 build_tf.py --output_dir=${PATH_TO_TF_BUILD} --tf_version=v2.4.1
186+
python3 build_tf.py --output_dir=${PATH_TO_TF_BUILD} --tf_version=v2.5.0
187187

188188
## OpenVINO™
189189

0 commit comments

Comments
 (0)