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

[Phi] Refactor logic of judging whether having a phi kernrel #46920

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Oct 12, 2022

PR types

Others

PR changes

Others

Describe

优化静态图下判断Phi算子库是否有对应算子Kernel的相关逻辑(HasCompatiblePhiKernel函数)。
优化前的判断逻辑需要保证一个算子的多个不同名kernel中至少有一个需要与op名相同(如split算子对应的两个kernel:splitsplit_with_num),但Sparse类算子目前无法做到kernel名与算子名相同,为了支持Sparse类算子Kernel的选择,本PR中修改了对于Phi下是否存在对应的Kernel的判断逻辑,改为直接从base_kernel_name_map_arg_mapping_fn_map中进行判断,从而可以免除上述的限制条件。

@paddle-bot
Copy link

paddle-bot bot commented Oct 12, 2022

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

@jiahy0825 jiahy0825 left a comment

Choose a reason for hiding this comment

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

LGTM

@zyfncg zyfncg merged commit 8d797fd into PaddlePaddle:develop Oct 13, 2022
@zyfncg zyfncg deleted the choose_phi_kernel branch October 13, 2022 13:29
zyfncg added a commit to zyfncg/Paddle that referenced this pull request Oct 28, 2022
…addle#46920)

* refind logic of choose phi kernrel

* fix complie budg
phlrain pushed a commit that referenced this pull request Nov 1, 2022
…6993) (#47417)

* support generating code of opmaker for backward op invoke forward op (#46912)

* [code-gen] Support code-gen for opmaker of sparse op (#46993)

* support generating code of opmaker for backward op invoke forward op

* gsupport code-gen of opmaker for sparse op

* refind logic of choose phi kernrel

* fix complie budg

* fix code_gen bug

* fix bug

* fix kernel signature code-gen

* fix complie bug of VarType

* fix complie bug of VarType

* fix test_sparse_conv_op

* fix test_sparse_norm_op

* [Phi] Refactor logic of judging whether having a phi kernrel (#46920)

* refind logic of choose phi kernrel

* fix complie budg

* update cmake
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.

4 participants