Browse Source

!284 dts: slice kernel outputdesc bug

From: @wangwenhua1
Reviewed-by: @xchu42,@ji_chen
Signed-off-by:
tags/v1.1.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
05178072c4
2 changed files with 3 additions and 1 deletions
  1. +0
    -0
      ge/graph/common/transop_util.cc
  2. +3
    -1
      ge/host_kernels/slice_kernel.cc

+ 0
- 0
ge/graph/common/transop_util.cc View File


+ 3
- 1
ge/host_kernels/slice_kernel.cc View File

@@ -100,7 +100,9 @@ Status SliceKernel::Compute(const OpDescPtr attr, const std::vector<ConstGeTenso
} }
// construct tensorDesc // construct tensorDesc
ge::GeShape output_shape(output_dims); ge::GeShape output_shape(output_dims);
GeTensorDesc output_tensor_desc(output_shape, FORMAT_NCHW, data_type);
auto attr_output_tensor_desc = attr->GetOutputDesc(0);
GeTensorDesc output_tensor_desc(attr_output_tensor_desc);
output_tensor_desc.SetShape(output_shape);
GeTensorPtr output_ptr = MakeShared<GeTensor>(output_tensor_desc); GeTensorPtr output_ptr = MakeShared<GeTensor>(output_tensor_desc);
if (output_ptr == nullptr) { if (output_ptr == nullptr) {
GELOGW("make_shared ge::GeTensor failed, node name %s.", attr->GetName().c_str()); GELOGW("make_shared ge::GeTensor failed, node name %s.", attr->GetName().c_str());


Loading…
Cancel
Save