!47301 Orgqr问题单处理

Merge pull request !47301 from wujueying/master
This commit is contained in:
i-robot 2022-12-30 02:00:51 +00:00 committed by Gitee
commit 843361102c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 0 deletions

View File

@ -52,6 +52,10 @@ abstract::ShapePtr OrgqrInferShape(const PrimitivePtr &, const std::vector<Abstr
<< ", while x.shape[-2] is " << x_shape[rank - kRowIndex] << " and x.shape[-1] is "
<< x_shape[rank - kColIndex] << ".";
}
if (tau_shape.size() < 1) {
MS_EXCEPTION(ValueError) << "For Orgqr, tau should have one dimension less than x"
<< ", but tensor has no dimensions";
}
if (*(x_shape.end() - 1) < *(tau_shape.end() - 1)) {
MS_EXCEPTION(ValueError) << "For Orgqr, x.shape[-1] must be greater than or equal to tau.shape[-1]"
<< ", while x.shape[-1] is " << x_shape[rank - kColIndex] << " and "