diff options
author | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-30 17:59:07 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-30 17:59:07 -0700 |
commit | a41f0ef8f2978432fb2f853df645cc4145860833 (patch) | |
tree | 8aa40890684cd846225bb0e31c8a98105c5196e9 /tensorflow/core/graph | |
parent | 3a61d7f0cb8147b9b3a1cabd89bd957dce6db13d (diff) | |
parent | 1a00709a05115560a54d8c8a4d045353151708a8 (diff) |
Merge pull request #21665 from Intel-tensorflow:static-code-scan-issues
PiperOrigin-RevId: 211013893
Diffstat (limited to 'tensorflow/core/graph')
-rw-r--r-- | tensorflow/core/graph/mkl_graph_util.h | 2 | ||||
-rw-r--r-- | tensorflow/core/graph/mkl_layout_pass.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/core/graph/mkl_graph_util.h b/tensorflow/core/graph/mkl_graph_util.h index 333bf761b0..bab1df87a4 100644 --- a/tensorflow/core/graph/mkl_graph_util.h +++ b/tensorflow/core/graph/mkl_graph_util.h @@ -41,7 +41,7 @@ namespace tensorflow { typedef enum { TENSORS_INTERLEAVED, TENSORS_CONTIGUOUS } MklTfTensorOrdering; // NOTE: Currently, we use contiguous ordering. If you change this, then you // would need to change Mkl op definitions in nn_ops.cc. -static MklTfTensorOrdering kTensorOrdering = TENSORS_CONTIGUOUS; +static const MklTfTensorOrdering kTensorOrdering = TENSORS_CONTIGUOUS; // Get index of MetaData tensor from index 'n' of Data tensor. inline int DataIndexToMetaDataIndex(int n, int total_tensors) { diff --git a/tensorflow/core/graph/mkl_layout_pass.cc b/tensorflow/core/graph/mkl_layout_pass.cc index 7e501c1717..2e644fe987 100644 --- a/tensorflow/core/graph/mkl_layout_pass.cc +++ b/tensorflow/core/graph/mkl_layout_pass.cc @@ -1043,6 +1043,7 @@ void MklLayoutRewritePass::GetDummyMklTensorNode(std::unique_ptr<Graph>* g, // device of the original // node. .Finalize(&**g, out)); + CHECK_NOTNULL(*out); // Make sure we got a valid object before using it // If number of inputs to the original node is > 0, then we add // control dependency between 1st input (index 0) of the original node and @@ -1336,6 +1337,7 @@ void MklLayoutRewritePass::GetDummyWorkspaceTensorNode( // device of the original // node. .Finalize(&**g, out)); + CHECK_NOTNULL(*out); // Make sure we got a valid object before using it // If number of inputs to the original node is > 0, then we add // control dependency between 1st input (index 0) of the original node and @@ -3214,6 +3216,7 @@ void MklLayoutRewritePass::GetDummyMklTensorNode(std::unique_ptr<Graph>* g, // device of the original // node. .Finalize(&**g, out)); + CHECK_NOTNULL(*out); // Make sure we got a valid object before using it // If number of inputs to the original node is > 0, then we add // control dependency between 1st input (index 0) of the original node and |