Browse Source

1.add superkernel off attr for graph 2.bugfix for dynamic_stitch_kernel.cc

tags/v1.2.0
gengchao4@huawei.com 3 years ago
parent
commit
1ada541c75
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      ge/host_kernels/dynamic_stitch_kernel.cc

+ 3
- 2
ge/host_kernels/dynamic_stitch_kernel.cc View File

@@ -111,8 +111,9 @@ void DynamicStitchKernel::ComputeMergedShape(const vector<ConstGeTensorPtr> &inp
int32_t merged_first_dim = 0;
int64_t indices_shape_size = 0;
for (int i = 0; i < n_; i++) {
indices_shape_size = input[i]->GetTensorDesc().GetShape().GetShapeSize();
indices_shape_size = indices_shape_size == 0 ? 1 : indices_shape_size;
// shape is [] means scalar
indices_shape_size =
input[i]->GetTensorDesc().GetShape().GetDims().empty() ? 1 : input[i]->GetTensorDesc().GetShape().GetShapeSize();
const int32_t *input_indices = reinterpret_cast<const int32_t *>(input[i]->GetData().data());
for (int64_t j = 0; j < indices_shape_size; j++) {
merged_first_dim = std::max(merged_first_dim, input_indices[j]);


Loading…
Cancel
Save