Repository navigation
[Cherry-Pick][Operator Mechanism]Add K-dim consistency check to matmul_grad InferMeta #79839
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
946bf90
[PHI] Add K-dim consistency check to matmul_grad InferMeta
feixi139 8ebcf79
[PHI] Add unit test for matmul_grad K-dim consistency check
feixi139 20fc16c
[PHI] Only enforce matmul_grad K check when both dims are concrete
feixi139 75da5fb
[PIR] Register MatmulGradInferMeta in _INFERMETA_NEED_META_CONFIG
feixi139 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_INFERMETA_NEED_META_CONFIG唯一作用是让 PIR 生成的 build / infer_meta 代码在调用末尾追加phi::MetaConfig(false, false)(op_build_gen.py的CREATE_INFER_META_FUNC_WITH_META_CONFIG_TEMPLATE,op_infermeta_func_gen.py同理)。但本 PR 新增的MatmulGradInferMeta(paddle/phi/infermeta/backward.cc第 732-788 行)在第三个 commit 之后已完全不读取config——判定条件是K_lhs != -1 && K_rhs != -1,与config.is_runtime无关。因此注册后只是把默认MetaConfig()(is_runtime=true)换成MetaConfig(false, false),不产生任何行为差异;白名单里其余条目(如MatmulInferMeta)都是真正使用config的函数。另外,devPR #79800(已于 develop 合入,a48f1c3)并不包含本行,本 cherry-pick 仅此一处与 devPR 有差异,PR 描述中也未提及该文件,会造成 release/3.4 与 develop 的生成器白名单不一致,后续 cherry-pick 易产生冲突。
建议:若无实际依赖,删掉该行以与 devPR 保持一致(同时可考虑移除
MatmulGradInferMeta中未被使用的MetaConfig config形参);若确有保留必要,请在描述中补充原因并同步回 develop。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devPR #79857 已补充合入