Fixed hipDeviceGetAttribute
1. Added negative test for hipDeviceGetAttribute 2. Fixed hipDeviceGetAttribute if int ptr input is null Change-Id: I0e31f50fa407701fddf96e4eb64a87a371ff5d95
这个提交包含在:
1 父节点
1b14393a85
当前提交
5b45c97a30
2 个文件已更改
+26
没有与搜索条件相匹配的文件
@@ -155,6 +155,8 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
|
||||
|
||||
hipError_t e = hipSuccess;
|
||||
|
||||
if(pi != nullptr) {
|
||||
|
||||
auto * hipDevice = ihipGetDevice(device);
|
||||
hipDeviceProp_t *prop = &hipDevice->_props;
|
||||
if (hipDevice) {
|
||||
@@ -215,6 +217,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
|
||||
} else {
|
||||
e = hipErrorInvalidDevice;
|
||||
}
|
||||
}else{
|
||||
e = hipErrorInvalidDevice;
|
||||
}
|
||||
return ihipLogStatus(e);
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户