forked from mindspore-Ecosystem/mindspore
fix allgather op select bug
This commit is contained in:
parent
7458b4a099
commit
ad2ce8a591
|
@ -45,7 +45,7 @@ std::string GetKernelFormat(const CNodePtr &kernel_node, size_t index) {
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
auto input_shape = AnfAlgo::GetPrevNodeOutputInferShape(kernel_node, index);
|
auto input_shape = AnfAlgo::GetPrevNodeOutputInferShape(kernel_node, index);
|
||||||
if (op_name == kAllGatherOpName) {
|
if (op_name == kAllGatherOpName && input_shape.size() <= kShape4dDims) {
|
||||||
auto pad_shape = trans::PaddingShapeTo4dDefault(input_shape);
|
auto pad_shape = trans::PaddingShapeTo4dDefault(input_shape);
|
||||||
if (pad_shape[N_nchw] % kCubeSize != 0 || pad_shape[C_nchw] % kCubeSize != 0) {
|
if (pad_shape[N_nchw] % kCubeSize != 0 || pad_shape[C_nchw] % kCubeSize != 0) {
|
||||||
return kOpFormat_DEFAULT;
|
return kOpFormat_DEFAULT;
|
||||||
|
|
Loading…
Reference in New Issue