forked from mindspore-Ecosystem/mindspore
!48567 修复gpu并行用例算子收到undetermined类型问题
Merge pull request !48567 from 李良灿/fixpara
This commit is contained in:
commit
0e6c5cf5ff
|
@ -292,6 +292,12 @@ AbstractBasePtr MakeAbstract(const BaseShapePtr &base_shape, const TypePtr &type
|
|||
if ((base_shape->isa<Shape>())) {
|
||||
auto shape = base_shape->cast<ShapePtr>();
|
||||
MS_EXCEPTION_IF_NULL(shape);
|
||||
auto shape_vec = shape->shape();
|
||||
// if the size of shape list is empty, return an scalar abstract
|
||||
if (shape_vec.empty() && (!type->isa<TensorType>())) {
|
||||
abstract::AbstractScalarPtr abs_scalar = std::make_shared<abstract::AbstractScalar>(kAnyValue, type);
|
||||
return abs_scalar;
|
||||
}
|
||||
return MakeAbstractTensor(shape, type);
|
||||
} else if (base_shape->isa<NoShape>() && type->isa<Number>()) {
|
||||
return std::make_shared<abstract::AbstractScalar>(kAnyValue, type);
|
||||
|
|
|
@ -53,7 +53,7 @@ AbstractBasePtr LogicalNotInfer(const abstract::AnalysisEnginePtr &, const Primi
|
|||
CheckAndConvertUtils::CheckInputArgs(input_args, kGreaterEqual, input_num, primitive->name());
|
||||
auto infer_type = LogicalNotInferType(primitive, input_args);
|
||||
auto infer_shape = LogicalNotInferShape(primitive, input_args);
|
||||
return abstract::MakeAbstract(infer_shape, infer_type);
|
||||
return abstract::MakeAbstractTensor(infer_shape, infer_type);
|
||||
}
|
||||
|
||||
// AG means auto generated
|
||||
|
|
Loading…
Reference in New Issue