message: Add support for building ngraph-bridge using prebuilt ngraph
  Add a CLI option to build_ngtf.py to skip building ngraph and allow
  using a prebuilt ngraph library.
diff: @@ -100,6 +100,13 @@ def main():
  "Note that in this case C++ unit tests won't be build for nGraph-TF bridge",
  action="store_true")
  + parser.add_argument(
  + '--use_prebuilt_ngraph',
  + type=str,
  + help=
  + "Skip building ngraph and use pre-built version from the specified directory.\n",
  + action="store")
  +
  parser.add_argument(
  '--distributed_build',
  type=str,
  @@ -386,7 +393,9 @@ def main():
  # will be 1
  cxx_abi = install_tensorflow(venv_dir, artifacts_location)
  - # Download nGraph if required.
  + flag_string_map = {True: 'YES', False: 'NO'}
  + # Build nGraph if required.
  + if not arguments.use_prebuilt_ngraph:
  ngraph_src_dir = './ngraph'
  if arguments.ngraph_src_dir:
  ngraph_src_dir = arguments.ngraph_src_dir
  @@ -397,7 +406,8 @@ def main():
  ngraph_version = arguments.ngraph_version
  print("nGraph Version: ", ngraph_version)
  - download_repo("ngraph", "https://github.com/NervanaSystems/ngraph.git",
  + download_repo("ngraph",
  + "https://github.com/NervanaSystems/ngraph.git",
  ngraph_version)
  # Now build nGraph
  @@ -428,13 +438,14 @@ def main():
  if arguments.build_plaidml_backend:
  command_executor(["pip", "install", "-U", "plaidML"])
  - flag_string_map = {True: 'YES', False: 'NO'}
  ngraph_cmake_flags.extend([
  "-DNGRAPH_TOOLS_ENABLE=" +
  flag_string_map[platform.system() != 'Darwin']
  ])
  - ngraph_cmake_flags.extend(
  - ["-DNGRAPH_GPU_ENABLE=" + flag_string_map[arguments.build_gpu_backend]])
  + ngraph_cmake_flags.extend([
  + "-DNGRAPH_GPU_ENABLE=" +
  + flag_string_map[arguments.build_gpu_backend]
  + ])
  ngraph_cmake_flags.extend([
  "-DNGRAPH_PLAIDML_ENABLE=" +
  flag_string_map[arguments.build_plaidml_backend]
  @@ -452,9 +463,17 @@ def main():
  "-DUNIT_TEST_ENABLE=ON",
  "-DNGRAPH_TARGET_ARCH=" + target_arch,
  "-DNGRAPH_TUNE_ARCH=" + target_arch,
  - "-DNGRAPH_ARTIFACTS_DIR=" + artifacts_location,
  ]
  + if not arguments.use_prebuilt_ngraph:
  + ngraph_tf_cmake_flags.extend(
  + ["-DNGRAPH_ARTIFACTS_DIR=" + artifacts_location])
  + else:
  + ngraph_tf_cmake_flags.extend([
  + "-DNGRAPH_ARTIFACTS_DIR=" + os.path.abspath(
  + arguments.use_prebuilt_ngraph)
  + ])
  +
  if (arguments.use_ngraph_staticlibs):
  ngraph_tf_cmake_flags.extend(["-DNGRAPH_BRIDGE_STATIC_LIB_ENABLE=TRUE"])
  