This commit is contained in:
zong-shuai 2023-02-06 16:08:10 +08:00
parent 14c7ec580e
commit fa36c156b7
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,7 @@ abstract::ShapePtr OrmqrInferShape(const PrimitivePtr &primitive, const std::vec
if ((x_rank - kColIndex) != tau_rank) {
MS_EXCEPTION(ValueError) << "For Ormqr, tau should have one dimension less than x"
<< ", while rank of x is" << x_shape.size() << " and "
<< ", while rank of x is " << x_shape.size() << " and "
<< "rank of tau is " << tau_shape.size() << ".";
}
if (x_rank != other_rank) {

View File

@ -32,11 +32,13 @@ namespace {
abstract::ShapePtr UravelIndexInferShape(const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);
auto op_name = primitive->name();
const int64_t input_num = 2;
(void)CheckAndConvertUtils::CheckInteger("input number", SizeToLong(input_args.size()), kEqual, input_num, op_name);
if (!input_args[0]->isa<abstract::AbstractTensor>() || !input_args[1]->isa<abstract::AbstractTensor>()) {
MS_EXCEPTION(TypeError) << "Input must be a Tensor.";
}
auto op_name = primitive->name();
auto indices_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[0]->BuildShape())[kShape];
auto dims_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[1]->BuildShape())[kShape];
// support dynamic shape