PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.17k stars 5.57k forks source link

[Auto Parallel] Add the CheckAndUpdateUnknownGlobalShape stage in dis… #68855

Open zhangyuqin1998 opened 1 day ago

zhangyuqin1998 commented 1 day ago

…t_api_gen to avoid errors caused by unfilled global shape

PR Category

Auto Parallel

PR Types

Bug fixes

Description

In op such as nonzero, the output shape is set to -1 by the infer_meta_fn. This shape is then determined within the kernel. Therefore, we need to inspect and backfill the global shape after the kernel call.

In the newly added CheckAndUpdateUnknownGlobalShape function, we check whether the global_shape contains -1. If it does, we replace it with the corresponding value from local_shape.

paddle-bot[bot] commented 1 day ago

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.