Skip to content

Commit

Permalink
Sarkars/revert last (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantan-nervana authored Dec 5, 2019
1 parent bec0d8a commit b40f6ee
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 99 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ if (NOT USE_PRE_BUILT_NGRAPH)
ExternalProject_Add(
ext_ngraph
GIT_REPOSITORY https://github.com/NervanaSystems/ngraph
GIT_TAG df4d896be578fc706061929dec1fad31fe37da24
GIT_TAG v0.25.1-rc.10
CMAKE_ARGS
-DNGRAPH_DISTRIBUTED_ENABLE=${NGRAPH_DISTRIBUTED_ENABLE}
-DNGRAPH_INSTALL_PREFIX=${NGRAPH_ARTIFACTS_DIR}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Once TensorFlow's dependencies are installed, clone the `ngraph-bridge` repo:

git clone https://github.com/tensorflow/ngraph-bridge.git
cd ngraph-bridge
git checkout v0.19.0-rc6
git checkout v0.19.0-rc7

Run the following Python script to build TensorFlow, nGraph, and the bridge. Use Python 3.5:

Expand Down
8 changes: 4 additions & 4 deletions bazel/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ tf_workspace(path_prefix = "", tf_repo_name = "org_tensorflow")
http_archive(
name = "ngraph",
build_file = "//:bazel/ngraph.BUILD",
sha256 = "782f4d6f5aae17cabebb900787283b13d6308dc9b0f4b3d89c55134f1e74a91a",
strip_prefix = "ngraph-df4d896be578fc706061929dec1fad31fe37da24",
sha256 = "110b4f40033ea28425a3b80bc0cb81a0301f5cc0bb92c200f113dfeb9533aec7",
strip_prefix = "ngraph-0.25.1-rc.10",
urls = [
"https://mirror.bazel.build/github.com/NervanaSystems/ngraph/archive/df4d896be578fc706061929dec1fad31fe37da24.tar.gz",
"https://github.com/NervanaSystems/ngraph/archive/df4d896be578fc706061929dec1fad31fe37da24.tar.gz"
"https://mirror.bazel.build/github.com/NervanaSystems/ngraph/archive/v0.25.1-rc.10.tar.gz",
"https://github.com/NervanaSystems/ngraph/archive/v0.25.1-rc.10.tar.gz"
],
)

Expand Down
3 changes: 1 addition & 2 deletions bazel/ngraph.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ cc_library(
"-fstack-protector-all",
'-D SHARED_LIB_PREFIX=\\"lib\\"',
'-D SHARED_LIB_SUFFIX=\\".so\\"',
'-D NGRAPH_VERSION=\\"df4d896be578fc706061929dec1fad31fe37da24\\"',
'-D NGRAPH_VERSION=\\"v0.25.1-rc.10\\"',
"-D NGRAPH_DEX_ONLY",
'-D PROJECT_ROOT_DIR=\\"\\"',
] + CXX_ABI,
Expand Down Expand Up @@ -169,7 +169,6 @@ cc_library(
"src/ngraph/runtime/cpu/builder/convert.cpp",
"src/ngraph/runtime/cpu/builder/convert_layout.cpp",
"src/ngraph/runtime/cpu/builder/convolution.cpp",
"src/ngraph/runtime/cpu/builder/cum_sum.cpp",
"src/ngraph/runtime/cpu/builder/dot.cpp",
"src/ngraph/runtime/cpu/builder/dropout.cpp",
"src/ngraph/runtime/cpu/builder/embedding_lookup.cpp",
Expand Down
2 changes: 1 addition & 1 deletion build_ngtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main():
'''

# Component versions
ngraph_version = "df4d896be578fc706061929dec1fad31fe37da24" #Pruthvi Cumsum for Waymo
ngraph_version = "v0.25.1-rc.10"
tf_version = "v1.14.0"

# Command line parser options
Expand Down
17 changes: 1 addition & 16 deletions ngraph_bridge/ngraph_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1664,21 +1664,6 @@ static Status TranslateCropAndResizeOp(const Node* op,
return Status::OK();
}

static Status TranslateCumsumOp(const Node* op,
const std::vector<const Tensor*>&,
Builder::OpMap& ng_op_map) {
shared_ptr<ng::Node> ng_x, ng_axis;
TF_RETURN_IF_ERROR(GetInputNodes(ng_op_map, op, &ng_x, &ng_axis));
bool exclusive, reverse;
TF_RETURN_IF_ERROR(GetNodeAttr(op->attrs(), "exclusive", &exclusive));
TF_RETURN_IF_ERROR(GetNodeAttr(op->attrs(), "reverse", &reverse));

SaveNgOp(ng_op_map, op->name(),
ConstructNgNode<ng::op::CumSum>(op->name(), ng_x, ng_axis, exclusive,
reverse));
return Status::OK();
}

// Translate DepthToSpace op
static Status TranslateDepthToSpaceOp(const Node* op,
const std::vector<const Tensor*>&,
Expand Down Expand Up @@ -5039,7 +5024,7 @@ const static std::map<
{"Conv2DBackpropInput", TranslateConv2DBackpropInputOp},
{"Conv3D", TranslateConv3DOp}, {"Cos", TranslateUnaryOp<ngraph::op::Cos>},
{"CropAndResize", TranslateCropAndResizeOp},
{"Cumsum", TranslateCumsumOp}, {"DepthToSpace", TranslateDepthToSpaceOp},
{"DepthToSpace", TranslateDepthToSpaceOp},
{"DepthwiseConv2dNative", TranslateDepthwiseConv2dNativeOp},
{"Dequantize", TranslateDequantizeOp},
{"Equal", TranslateBinaryOp<ngraph::op::Equal>},
Expand Down
3 changes: 0 additions & 3 deletions ngraph_bridge/ngraph_mark_for_clustering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ Status MarkForClustering(Graph* graph, const std::set<string> skip_these_nodes,
confirmation_function_map["Conv3D"] = SimpleConfirmationFunction();
confirmation_function_map["CropAndResize"] = SimpleConfirmationFunction();
confirmation_function_map["Cos"] = SimpleConfirmationFunction();
confirmation_function_map["Cumsum"] = SimpleConfirmationFunction();
confirmation_function_map["DepthwiseConv2dNative"] =
SimpleConfirmationFunction();
confirmation_function_map["DepthToSpace"] = [](Node* n, bool* result) {
Expand Down Expand Up @@ -455,8 +454,6 @@ Status MarkForClustering(Graph* graph, const std::set<string> skip_these_nodes,
type_constraint_map["Conv3D"]["T"] = NGraphNumericDTypes();
type_constraint_map["CropAndResize"]["T"] = NGraphNumericDTypes();
type_constraint_map["Cos"]["T"] = NGraphRealDTypes();
type_constraint_map["Cumsum"]["T"] = NGraphNumericDTypes();
type_constraint_map["Cumsum"]["Tidx"] = NGraphIndexDTypes();
type_constraint_map["DepthToSpace"]["T"] = NGraphDTypes();
type_constraint_map["DepthwiseConv2dNative"]["T"] = NGraphNumericDTypes();
type_constraint_map["Dequantize"]["T"] = NGraphSupportedQuantizedDTypes();
Expand Down
16 changes: 0 additions & 16 deletions test/python/tensorflow/python_tests_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,6 @@ relu_op_test.ReluTest.testGradientFloat32
relu_op_test.ReluTest.testGradientFloat64
relu_op_test.ReluTest.testGradientScalar

scan_ops_test.CumsumTest.test1D
scan_ops_test.CumsumTest.test2D
scan_ops_test.CumsumTest.test3D
scan_ops_test.CumsumTest.test6D
scan_ops_test.CumsumTest.testAxisType
scan_ops_test.CumsumTest.testEmpty
scan_ops_test.CumsumTest.testGradient
scan_ops_test.CumsumTest.testGradient2D
scan_ops_test.CumsumTest.testGradientExclusive
scan_ops_test.CumsumTest.testGradientExclusiveReverse
scan_ops_test.CumsumTest.testGradientReverse
#This test fails due to error string matching issue
#scan_ops_test.CumsumTest.testInvalidAxis
scan_ops_test.CumsumTest.testLarge
scan_ops_test.CumsumTest.test_session

scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testBool
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape1
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape2
Expand Down
16 changes: 0 additions & 16 deletions test/python/tensorflow/python_tests_list_gpu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,22 +389,6 @@ relu_op_test.ReluTest.testGradientFloat32
relu_op_test.ReluTest.testGradientScalar
relu_op_test.ReluTest.testNumbers

scan_ops_test.CumsumTest.test1D
scan_ops_test.CumsumTest.test2D
scan_ops_test.CumsumTest.test3D
scan_ops_test.CumsumTest.test6D
scan_ops_test.CumsumTest.testAxisType
scan_ops_test.CumsumTest.testEmpty
scan_ops_test.CumsumTest.testGradient
scan_ops_test.CumsumTest.testGradient2D
scan_ops_test.CumsumTest.testGradientExclusive
scan_ops_test.CumsumTest.testGradientExclusiveReverse
scan_ops_test.CumsumTest.testGradientReverse
#This test fails due to error string matching issue
#scan_ops_test.CumsumTest.testInvalidAxis
scan_ops_test.CumsumTest.testLarge
scan_ops_test.CumsumTest.test_session

scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testBool
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape1
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape2
Expand Down
16 changes: 0 additions & 16 deletions test/python/tensorflow/python_tests_list_mac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,6 @@ relu_op_test.ReluTest.testGradientFloat32
relu_op_test.ReluTest.testGradientFloat64
relu_op_test.ReluTest.testGradientScalar

scan_ops_test.CumsumTest.test1D
scan_ops_test.CumsumTest.test2D
scan_ops_test.CumsumTest.test3D
scan_ops_test.CumsumTest.test6D
scan_ops_test.CumsumTest.testAxisType
scan_ops_test.CumsumTest.testEmpty
scan_ops_test.CumsumTest.testGradient
scan_ops_test.CumsumTest.testGradient2D
scan_ops_test.CumsumTest.testGradientExclusive
scan_ops_test.CumsumTest.testGradientExclusiveReverse
scan_ops_test.CumsumTest.testGradientReverse
#This test fails due to error string matching issue
#scan_ops_test.CumsumTest.testInvalidAxis
scan_ops_test.CumsumTest.testLarge
scan_ops_test.CumsumTest.test_session

scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testBool
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape1
scatter_nd_ops_test.ScatterNdNonAliasingAddTest.testEmptyOutputShape2
Expand Down
23 changes: 0 additions & 23 deletions test/test_math_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,30 +297,7 @@ TEST(MathOps, AllPositiveAxis) {

opexecuter.RunTest();
} // end of test op All
// Test op: Add
TEST(MathOps, Cumsum) {
Scope root = Scope::NewRootScope();
int dim1 = 2;
int dim2 = 2;

Tensor A(DT_FLOAT, TensorShape({dim1, dim2}));
Tensor B(DT_INT32, TensorShape({}));

AssignInputValues(A, 2.1f);
AssignInputValues(B, 0);

vector<int> static_input_indexes = {};
auto attrs = ops::Cumsum::Attrs();
attrs.exclusive_ = true;
attrs.reverse_ = true;
auto R = ops::Cumsum(root, A, B, attrs);

vector<DataType> output_datatypes = {DT_FLOAT};
std::vector<Output> sess_run_fetchoutputs = {R};
OpExecuter opexecuter(root, "Cumsum", static_input_indexes, output_datatypes,
sess_run_fetchoutputs);
opexecuter.RunTest();
} // end of test op Add
// Test op: Sum with & without keep dims & with both positive & negative axis
TEST(MathOps, Sum) {
int dim1 = 2;
Expand Down

0 comments on commit b40f6ee

Please sign in to comment.