Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pir comiler name id bug #59642

Merged
merged 8 commits into from
Dec 6, 2023

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Dec 4, 2023

PR types

Bug fixes

PR changes

Others

Description

修复pir compiler中名字命名冲突的bug

  1. 旧的value name在实现的时候,对于value先计算了hash,然后去查询map,这个hash 容易发生碰撞,pr中升级,把map中的key直接换成了value,在hash碰撞的时候,能够对比真实的value
  2. 旧的value name是通过全局map的方式,这种方式实现上不太合理, 改成pir compiler 内部持有的map来管理

Pcard-67164

Copy link

paddle-bot bot commented Dec 4, 2023

你的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.

Copy link

paddle-bot bot commented Dec 4, 2023

✅ This PR's description meets the template requirements!
Please wait for other CI results.

group_inputs.insert(value);
continue;
}
// if (std::find(this->input_names.begin(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to delete

Copy link
Contributor

@BiynXu BiynXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

// std::transform(
// group->output_ops.begin(),
// group->output_ops.end(),
// std::inserter(output_tensor_names, output_tensor_names.begin()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need delete this

@@ -96,6 +91,49 @@ struct CompatibleInfo {
std::vector<int64_t> GetBroadcastAxis(const phi::DDim& in_shape,
const std::vector<int64_t>& out_shape);

struct NameGenerator {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以复用CINN里的,把那个头文件里的PrettyNamer 删除掉。

@phlrain phlrain merged commit 3d15723 into PaddlePaddle:develop Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants