-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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】Add device query components for cinn #58988
【CINN】Add device query components for cinn #58988
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
paddle/cinn/common/dev_info_base.h
Outdated
@@ -0,0 +1,26 @@ | |||
// Copyright (c) 2021 CINN Authors. All Rights Reserved. |
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.
年份改下,下同
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.
Done
paddle/cinn/common/nvgpu_dev_info.h
Outdated
class NVGPUDevInfo : public DevInfoBase { | ||
public: | ||
explicit NVGPUDevInfo(int device) : device_num_(device) { | ||
#ifdef CINN_WITH_CUDA |
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.
该文件内是nvgpu的device信息,感觉可以在编译时期就确定此文件是否编译(-DCINN_WITH_CUDA=ON or OFF
),不用到处加这个宏判断?
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.
不加编不过。。。
int device_num = 0); | ||
|
||
Target::Arch arch_; | ||
int device_num_; |
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.
考虑多卡这里是不是应该搞个vector
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.
主要混合设备下不同架构的接口不同,如果异构的情况下,几个设备放在一块感觉Get的时候会比较乱,如果是同种设备,get其中一个也就OK了,所以就没搞这事
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.
LGTM
* add device query components for cinn * fix include file path bug * refactor code
PR types
Others
PR changes
Others
Description
pcard-72718
This PR add device-query component for CINN