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

[Pten]Support parse kernel key by multi-inputs #37517

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

YuanRisheng
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Support parse kernel key by multi-inputs and the final kernel key's dtype will be determined by multi-inputs' dtype

@paddle-bot-old
Copy link

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

Shixiaowei02
Shixiaowei02 previously approved these changes Nov 25, 2021
Comment on lines 80 to 82
} else if ((dtype_set.bitset() & f8) == f8) {
promote_type = DataType::FLOAT64;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

注释里说这个函数是处理复数类型的,这里对float64的处理是为了?

Copy link
Contributor Author

@YuanRisheng YuanRisheng Nov 26, 2021

Choose a reason for hiding this comment

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

已删

@@ -51,6 +52,8 @@ struct KernelKeySet {
BackendSet backend_set{Backend::UNDEFINED};
DataLayout layout{DataLayout::UNDEFINED};
DataType dtype{DataType::UNDEFINED};
Copy link
Contributor

Choose a reason for hiding this comment

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

dtype和dtype set设计上能否仅保留其一,比如在最终取回kernel key的时候,根据dtype set计算dtype,目前看起来有些冗余

Copy link
Contributor Author

Choose a reason for hiding this comment

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

由于dtype自己的特性需要都保留,不过已优化了代码,看起来更好一些

Copy link
Contributor

@chenwhql chenwhql 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 a0b895c into PaddlePaddle:develop Nov 26, 2021
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
* Support parse kernel key by multi-inputs

* optimize code according to reviewer
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