PaddlePaddle / Paddle

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

[CINN]Fix AnalysisExternalInputs invalid pointer problem #63992

Closed Aurelius84 closed 2 weeks ago

Aurelius84 commented 2 weeks ago

PR Category

CINN

PR Types

Bug fixes

Description

Pcard-67164

从日志上来看,如下行出来的group_ops里的指针是悬空的:

auto group_ops = std::unordered_set<pir::Operation*>(
      group_op.GetOperators().begin(), group_op.GetOperators().end());

group_op.GetOperators()返回的是一个临时对象,而非引用。两次调用,返回了两个临时对象,基于迭代器构造unordered_set不是同一个对象的begin和end。

paddle-bot[bot] commented 2 weeks 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.