make shape to {1} for Svd's u,v if compute_uv is False

This commit is contained in:
huanghui 2023-02-09 20:28:00 +08:00
parent d6d132e3ae
commit 2b391b2285
2 changed files with 4 additions and 4 deletions

View File

@ -87,8 +87,8 @@ void SvdGpuKernelMod::InitSizeLists() {
output_size_list_.push_back(batch_size_ * n_ * p_ * unit_size_);
}
} else {
output_size_list_.push_back(0);
output_size_list_.push_back(0);
output_size_list_.push_back(1);
output_size_list_.push_back(1);
}
// for dev_info
workspace_size_list_.push_back(batch_size_ * sizeof(int));

View File

@ -65,8 +65,8 @@ abstract::BaseShapePtr SvdInferShape(const PrimitivePtr &prim, const std::vector
v_shape[v_shape.size() - kIndexOne] = p;
}
} else {
u_shape = {0};
v_shape = {0};
u_shape = {1};
v_shape = {1};
}
std::vector<abstract::BaseShapePtr> shape_tuple;