From d856a3ca443599feb7d577ba17943a76ffa65c1e Mon Sep 17 00:00:00 2001 From: avijit-nervana Date: Wed, 12 Dec 2018 00:33:46 -0800 Subject: [PATCH] Upgraded to v0.9.0 and fixed the broken MacOS build --- tensorflow/tensorflow.bzl | 3 +-- tensorflow/workspace.bzl | 32 +++++++++++++++--------------- third_party/ngraph/ngraph.BUILD | 18 +++++++++++++---- third_party/ngraph/ngraph_tf.BUILD | 2 ++ 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index ed1de5a31ca..d93e0df5e44 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -1666,8 +1666,7 @@ def tf_py_wrap_cc( ) extra_linkopts = select({ "@local_config_cuda//cuda:darwin": [ - "-Wl,-exported_symbols_list", - "$(location %s.lds)" % vscriptname, + "-Wl,-exported_symbols_list,$(location %s.lds)" % vscriptname, ], clean_dep("//tensorflow:windows"): [], "//conditions:default": [ diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index f8b6bd1a3ff..9ed668e1c58 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -828,44 +828,44 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): tf_http_archive( name = "tbb", build_file = clean_dep("//third_party/ngraph:tbb.BUILD"), - sha256 = "724686f90bcda78f13b76f297d964008737ccd6399328143c1c0093e73ae6a13", - strip_prefix = "tbb-tbb_2018", + sha256 = "c3245012296f09f1418b78a8c2f17df5188b3bd0db620f7fd5fabe363320805a", + strip_prefix = "tbb-2019_U1", urls = [ - "https://mirror.bazel.build/github.com/01org/tbb/archive/tbb_2018.zip", - "https://github.com/01org/tbb/archive/tbb_2018.zip", + "https://mirror.bazel.build/github.com/01org/tbb/archive/2019_U1.zip", + "https://github.com/01org/tbb/archive/2019_U1.zip", ], ) tf_http_archive( name = "ngraph", build_file = clean_dep("//third_party/ngraph:ngraph.BUILD"), - sha256 = "2b28f9c9f063b96825a96d56d7f7978c9a1c55c9b25175c20dd49a8a77cb0305", - strip_prefix = "ngraph-0.9.1", + sha256 = "a1780f24a1381fc25e323b4b2d08b6ef5129f42e011305b2a34dcf43a48030d5", + strip_prefix = "ngraph-0.11.0", urls = [ - "https://mirror.bazel.build/github.com/NervanaSystems/ngraph/archive/v0.9.1.tar.gz", - "https://github.com/NervanaSystems/ngraph/archive/v0.9.1.tar.gz", + "https://mirror.bazel.build/github.com/NervanaSystems/ngraph/archive/v0.11.0.tar.gz", + "https://github.com/NervanaSystems/ngraph/archive/v0.11.0.tar.gz" ], ) tf_http_archive( name = "nlohmann_json_lib", build_file = clean_dep("//third_party/ngraph:nlohmann_json.BUILD"), - sha256 = "9f3549824af3ca7e9707a2503959886362801fb4926b869789d6929098a79e47", - strip_prefix = "json-3.1.1", + sha256 = "c377963a95989270c943d522bfefe7b889ef5ed0e1e15d535fd6f6f16ed70732", + strip_prefix = "json-3.4.0", urls = [ - "https://mirror.bazel.build/github.com/nlohmann/json/archive/v3.1.1.tar.gz", - "https://github.com/nlohmann/json/archive/v3.1.1.tar.gz", + "https://mirror.bazel.build/github.com/nlohmann/json/archive/v3.4.0.tar.gz", + "https://github.com/nlohmann/json/archive/v3.4.0.tar.gz", ], ) tf_http_archive( name = "ngraph_tf", build_file = clean_dep("//third_party/ngraph:ngraph_tf.BUILD"), - sha256 = "89accbc702e68a09775f1011a99dd16561038fd1ce59d566d64450176abaae5c", - strip_prefix = "ngraph-tf-0.7.0", + sha256 = "742a642d2c6622277df4c902b6830d616d0539cc8cd843d6cdb899bb99e66e36", + strip_prefix = "ngraph-tf-0.9.0", urls = [ - "https://mirror.bazel.build/github.com/NervanaSystems/ngraph-tf/archive/v0.7.0.tar.gz", - "https://github.com/NervanaSystems/ngraph-tf/archive/v0.7.0.tar.gz", + "https://mirror.bazel.build/github.com/NervanaSystems/ngraph-tf/archive/v0.9.0.zip", + "https://github.com/NervanaSystems/ngraph-tf/archive/v0.9.0.zip" ], ) diff --git a/third_party/ngraph/ngraph.BUILD b/third_party/ngraph/ngraph.BUILD index 63e9548c532..bb1f65d3476 100644 --- a/third_party/ngraph/ngraph.BUILD +++ b/third_party/ngraph/ngraph.BUILD @@ -56,14 +56,16 @@ cc_library( "src/ngraph/runtime/cpu/cpu_backend.cpp", "src/ngraph/runtime/cpu/cpu_builder.cpp", "src/ngraph/runtime/cpu/cpu_call_frame.cpp", + "src/ngraph/runtime/cpu/cpu_cse.cpp", + "src/ngraph/runtime/cpu/cpu_executor.cpp", "src/ngraph/runtime/cpu/cpu_external_function.cpp", "src/ngraph/runtime/cpu/cpu_kernels.cpp", "src/ngraph/runtime/cpu/cpu_layout_descriptor.cpp", + "src/ngraph/runtime/cpu/cpu_op_annotations.cpp", "src/ngraph/runtime/cpu/cpu_tensor_view.cpp", "src/ngraph/runtime/cpu/cpu_tensor_view_wrapper.cpp", "src/ngraph/runtime/cpu/cpu_tracing.cpp", "src/ngraph/runtime/cpu/cpu_visualize_tree.cpp", - "src/ngraph/runtime/cpu/kernel/eigen_thread_pool.cpp", "src/ngraph/runtime/cpu/kernel/pad.cpp", "src/ngraph/runtime/cpu/kernel/reduce_max.cpp", "src/ngraph/runtime/cpu/kernel/reduce_sum.cpp", @@ -79,21 +81,27 @@ cc_library( "src/ngraph/runtime/cpu/op/conv_relu.cpp", "src/ngraph/runtime/cpu/op/convert_layout.cpp", "src/ngraph/runtime/cpu/op/group_conv.cpp", + "src/ngraph/runtime/cpu/op/group_conv_bias.cpp", + "src/ngraph/runtime/cpu/op/halide_op.cpp", + "src/ngraph/runtime/cpu/op/leaky_relu.cpp", "src/ngraph/runtime/cpu/op/loop_kernel.cpp", "src/ngraph/runtime/cpu/op/lstm.cpp", "src/ngraph/runtime/cpu/op/matmul_bias.cpp", "src/ngraph/runtime/cpu/op/max_pool_with_indices.cpp", "src/ngraph/runtime/cpu/op/rnn.cpp", "src/ngraph/runtime/cpu/op/sigmoid_mul.cpp", + "src/ngraph/runtime/cpu/op/update_slice.cpp", "src/ngraph/runtime/cpu/pass/cpu_assignment.cpp", "src/ngraph/runtime/cpu/pass/cpu_collapse_dims.cpp", - "src/ngraph/runtime/cpu/pass/cpu_concat_inputs.cpp", "src/ngraph/runtime/cpu/pass/cpu_fusion.cpp", + "src/ngraph/runtime/cpu/pass/cpu_horizontal_fusion.cpp", "src/ngraph/runtime/cpu/pass/cpu_layout.cpp", "src/ngraph/runtime/cpu/pass/cpu_loop_kernel_fusion.cpp", "src/ngraph/runtime/cpu/pass/cpu_mat_fusion.cpp", + "src/ngraph/runtime/cpu/pass/cpu_memory_optimization.cpp", "src/ngraph/runtime/cpu/pass/cpu_post_layout_optimizations.cpp", "src/ngraph/runtime/cpu/pass/cpu_rnn_fusion.cpp", + "src/ngraph/runtime/cpu/pass/cpu_reshape_sinking.cpp", "src/ngraph/runtime/cpu/pass/cpu_workspace_insertion.cpp", ], hdrs = glob(["src/ngraph/runtime/cpu/**/*.hpp"]) + glob([]), @@ -101,7 +109,7 @@ cc_library( "-I external/ngraph/src", "-I external/nlohmann_json_lib/include/", '-D SHARED_LIB_EXT=\\".so\\"', - '-D NGRAPH_VERSION=\\"0.9.1\\"', + '-D NGRAPH_VERSION=\\"0.11.0\\"', "-D NGRAPH_DEX_ONLY", '-D PROJECT_ROOT_DIR=\\"\\"', ], @@ -124,11 +132,13 @@ cc_library( "src/ngraph/builder/*.cpp", "src/ngraph/descriptor/*.cpp", "src/ngraph/descriptor/layout/*.cpp", + "src/ngraph/op/experimental/generate_mask.cpp", "src/ngraph/op/experimental/quantized_avg_pool.cpp", "src/ngraph/op/experimental/quantized_conv_bias.cpp", "src/ngraph/op/experimental/quantized_conv_relu.cpp", "src/ngraph/op/experimental/quantized_conv.cpp", "src/ngraph/op/experimental/quantized_max_pool.cpp", + "src/ngraph/op/experimental/shape_of.cpp", "src/ngraph/op/*.cpp", "src/ngraph/op/util/*.cpp", "src/ngraph/pattern/*.cpp", @@ -142,7 +152,7 @@ cc_library( "-I external/ngraph/src", "-I external/nlohmann_json_lib/include/", '-D SHARED_LIB_EXT=\\".so\\"', - '-D NGRAPH_VERSION=\\"0.9.1\\"', + '-D NGRAPH_VERSION=\\"0.11.0\\"', '-D PROJECT_ROOT_DIR=\\"\\"', ], visibility = ["//visibility:public"], diff --git a/third_party/ngraph/ngraph_tf.BUILD b/third_party/ngraph/ngraph_tf.BUILD index db9a66f9b5b..d4619395f8e 100644 --- a/third_party/ngraph/ngraph_tf.BUILD +++ b/third_party/ngraph/ngraph_tf.BUILD @@ -18,6 +18,8 @@ cc_library( "src/ngraph_api.h", "src/ngraph_assign_clusters.cc", "src/ngraph_assign_clusters.h", + "src/ngraph_backend_manager.h", + "src/ngraph_backend_manager.cc", "src/ngraph_builder.cc", "src/ngraph_builder.h", "src/ngraph_capture_variables.cc",