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

【CINN】refactor cuda query component #59096

Merged

Conversation

Courtesy-Xs
Copy link
Contributor

PR types

Others

PR changes

Others

Description

card-72718
This PR remove the ugly code for query nvgpu device info and refactor device info component for cinn

Copy link

paddle-bot bot commented Nov 17, 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.

@@ -20,6 +20,10 @@ namespace common {
class DevInfoBase {
public:
virtual ~DevInfoBase() = default;
explicit DevInfoBase(int device = 0) : device_num_(device) {}
Copy link
Contributor

@ZzSean ZzSean Nov 17, 2023

Choose a reason for hiding this comment

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

构造函数和析构函数位置调一下
这里传入的参数名改成device_num好一些?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
template <Target::Arch arch>
DevInfoMgr<arch>::DevInfoMgr(int device_num) : device_num_(device_num) {
impl = std::make_unique<NVGPUDevInfo>(device_num)
Copy link
Contributor

@ZzSean ZzSean Nov 17, 2023

Choose a reason for hiding this comment

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

  • impl少个下划线
  • 指针类型这里不应该写死吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Courtesy-Xs Courtesy-Xs reopened this Nov 21, 2023
@Courtesy-Xs Courtesy-Xs merged commit 619c16a into PaddlePaddle:develop Nov 22, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
* refactor cuda query component

* fix bugs

* fix review comments

* fix bugs

* fix cuda error

* bind should be used on NVGPU device
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