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 mkldnn invalid infershape impl #38837

Merged
merged 4 commits into from
Jan 13, 2022

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Jan 10, 2022

PR types

Function optimization

PR changes

Others

Describe

Fix mkldnn invalid infershape impl

The external information to be used in the InferShape function of the op needs to be passed in through the InferShapeContext. Even the information in current op should not be used.

When registering the OP, the InferShape function of the OP is stored as a member pointer of OpInfo. This member pointer may be used independently of the op. If the InferShape function relies on the internal member information of the OP, the inference results independent of the OP and bound with the op will be different, which will be wrong in some scenarios.

Therefore, this PR uniformly modifies the behavior of OP members directly used in some mkldnn related InferShape functions.

related PR: #38776

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@chenwhql chenwhql requested a review from zhiqiu January 10, 2022 07:33
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit 281644c into PaddlePaddle:develop Jan 13, 2022
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.

2 participants