minor clang fix
This commit is contained in:
parent
3f3b46333b
commit
264c259dca
@ -291,9 +291,8 @@ class MklConvFwdPrimitive : public MklPrimitive {
|
||||
|
||||
// Create convolution primitive and add it to net
|
||||
if (!convFwdDims.bias_dims.empty()) {
|
||||
context_.bias_mem.reset(
|
||||
new memory({{convFwdDims.bias_dims}, MklDnnType<Tbias>(),
|
||||
memory::format_tag::x},
|
||||
context_.bias_mem.reset(new memory(
|
||||
{{convFwdDims.bias_dims}, MklDnnType<Tbias>(), memory::format_tag::x},
|
||||
cpu_engine_, DummyData));
|
||||
context_.conv_fwd.reset(new convolution_forward(*context_.fwd_pd));
|
||||
context_.fwd_primitives_args.push_back(
|
||||
@ -465,13 +464,15 @@ class MklConvOp : public OpKernel {
|
||||
OP_REQUIRES(context, dilations_.size() == 5,
|
||||
errors::InvalidArgument("Dilation rates field must "
|
||||
"specify 5 dimensions"));
|
||||
OP_REQUIRES(context, (GetTensorDim(dilations_, data_format_, 'N') == 1 &&
|
||||
OP_REQUIRES(context,
|
||||
(GetTensorDim(dilations_, data_format_, 'N') == 1 &&
|
||||
GetTensorDim(dilations_, data_format_, 'C') == 1),
|
||||
errors::InvalidArgument(
|
||||
"Current implementation does not yet support "
|
||||
"dilations rates in the batch and depth dimensions."));
|
||||
OP_REQUIRES(
|
||||
context, (GetTensorDim(dilations_, data_format_, '0') > 0 &&
|
||||
context,
|
||||
(GetTensorDim(dilations_, data_format_, '0') > 0 &&
|
||||
GetTensorDim(dilations_, data_format_, '1') > 0 &&
|
||||
GetTensorDim(dilations_, data_format_, '2') > 0),
|
||||
errors::InvalidArgument("Dilated rates should be larger than 0."));
|
||||
@ -1749,9 +1750,10 @@ class MklQuantizedConv2DSumReluOp
|
||||
summand_mkl_shape.SetElemType(MklDnnType<Toutput>());
|
||||
}
|
||||
// TODO(intel-tf): Support cases when summand cannot be forwarded.
|
||||
OP_REQUIRES(context, ForwardMklTensorInToOutWithMklShape(
|
||||
context, summand_idx, 0, output_tensor,
|
||||
summand_mkl_shape, false),
|
||||
OP_REQUIRES(
|
||||
context,
|
||||
ForwardMklTensorInToOutWithMklShape(
|
||||
context, summand_idx, 0, output_tensor, summand_mkl_shape, false),
|
||||
errors::InvalidArgument(
|
||||
"Summand cannot be forwarded in the current fusion."));
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user