[newTests]Modified the test as per review comments
[ROCm/hip commit: a764a0980d]
This commit is contained in:
@@ -30,15 +30,17 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include "test_common.h"
|
#include "test_common.h"
|
||||||
|
|
||||||
|
const int len 256;
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int numDevices = 0;
|
int numDevices = 0;
|
||||||
char name[256];
|
char name[len];
|
||||||
hipDevice_t device;
|
hipDevice_t device;
|
||||||
HIPCHECK(hipGetDeviceCount(&numDevices));
|
HIPCHECK(hipGetDeviceCount(&numDevices));
|
||||||
for(int i=0;i<numDevices;i++){
|
for(int i=0;i<numDevices;i++){
|
||||||
HIPCHECK(hipDeviceGet(&device,i));
|
HIPCHECK(hipDeviceGet(&device,i));
|
||||||
HIPCHECK(hipDeviceGetName(name,256,device));
|
HIPCHECK(hipDeviceGetName(name,len,device));
|
||||||
HIPASSERT(name != "");
|
HIPASSERT(name != "");
|
||||||
}
|
}
|
||||||
passed();
|
passed();
|
||||||
|
|||||||
Reference in New Issue
Block a user