message: Initialized private variables in constructor to pass Clockworks and clang format fix
diff: @@ -17,7 +17,6 @@ limitations under the License.
  #include <vector>
  #include "mkldnn.hpp"
  -#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
  #include "tensorflow/core/framework/bounds_check.h"
  #include "tensorflow/core/framework/op_kernel.h"
  #include "tensorflow/core/framework/register_types.h"
  @@ -30,6 +29,7 @@ limitations under the License.
  #include "tensorflow/core/lib/core/status.h"
  #include "tensorflow/core/platform/types.h"
  #include "tensorflow/core/util/mkl_util.h"
  +#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
  using mkldnn::concat;
  using mkldnn::stream;
  @@ -152,8 +152,7 @@ class EigenConcatBaseOp : public OpKernel {
  int32 axis = (concat_dim < 0) ? (concat_dim + input_dims) : concat_dim;
  OP_REQUIRES(
  - c,
  - (0 <= axis && axis < input_dims) ||
  + c, (0 <= axis && axis < input_dims) ||
  (allow_legacy_scalars() && concat_dim == 0),
  errors::InvalidArgument(
  "ConcatOp : Expected concatenating dimensions in the range [",
  @@ -184,13 +183,12 @@ class EigenConcatBaseOp : public OpKernel {
  const auto in = values[i];
  const bool in_is_scalar = IsLegacyScalar(input_shapes[i]);
  OP_REQUIRES(
  - c,
  - (input_shapes[i].dims() == input_dims) ||
  + c, (input_shapes[i].dims() == input_dims) ||
  (input_is_scalar && in_is_scalar),
  errors::InvalidArgument(
  "ConcatOp : Ranks of all input tensors should match: shape[0] = ",
  - input_shape.DebugString(), " vs. shape[", i,
  - "] = ", input_shapes[i].DebugString()));
  + input_shape.DebugString(), " vs. shape[", i, "] = ",
  + input_shapes[i].DebugString()));
  if (in.NumElements() > 0) {
  int64 inputs_flat_dim1 = in.NumElements() / inputs_flat_dim0;
  inputs_flat.emplace_back(new typename TTypes<T, 2>::ConstMatrix(
  @@ -247,7 +245,9 @@ class MklConcatOp : public OpKernel {
  ConstMatrixVector;
  explicit MklConcatOp(OpKernelConstruction* c)
  - : OpKernel(c), eigen_concat_op_(c) {}
  + : OpKernel(c),
  + eigen_concat_op_(c),
  + data_format_(TensorFormat::FORMAT_NCHW) {}
  void Compute(OpKernelContext* context) override {
  try {
  @@ -555,9 +555,9 @@ class MklConcatOp : public OpKernel {
  }
  } catch (mkldnn::error& e) {
  - string error_msg = "Status: " + std::to_string(e.status) +
  - ", message: " + string(e.message) + ", in file " +
  - string(__FILE__) + ":" + std::to_string(__LINE__);
  + string error_msg = "Status: " + std::to_string(e.status) + ", message: " +
  + string(e.message) + ", in file " + string(__FILE__) +
  + ":" + std::to_string(__LINE__);
  OP_REQUIRES_OK(
  context,
  errors::Aborted("Operation received an exception:", error_msg));
  