Added further properties in hipChooseDevice

Change-Id: I8f7f5800e8a95873318a534f09e75e037ad31b06


[ROCm/hip commit: 13e88c54d7]
This commit is contained in:
Rahul Garg
2016-09-16 11:18:34 +05:30
orang tua e3f6800dfd
melakukan b4518a750f
+42 -1
Melihat File
@@ -305,7 +305,48 @@ hipError_t hipChooseDevice( int* device, const hipDeviceProp_t* prop )
}
}
}
if(prop->totalGlobalMem != 0) {
inPropCount++;
if(tempProp.totalGlobalMem >= prop->totalGlobalMem) {
matchedPropCount++;
}
}
if(prop->sharedMemPerBlock != 0) {
inPropCount++;
if(tempProp.sharedMemPerBlock >= prop->sharedMemPerBlock) {
matchedPropCount++;
}
}
if(prop->maxThreadsPerBlock != 0) {
inPropCount++;
if(tempProp.maxThreadsPerBlock >= prop->maxThreadsPerBlock ) {
matchedPropCount++;
}
}
if(prop->totalConstMem != 0) {
inPropCount++;
if(tempProp.totalConstMem >= prop->totalConstMem ) {
matchedPropCount++;
}
}
if(prop->multiProcessorCount != 0) {
inPropCount++;
if(tempProp.multiProcessorCount >= prop->multiProcessorCount ) {
matchedPropCount++;
}
}
if(prop->maxThreadsPerMultiProcessor != 0) {
inPropCount++;
if(tempProp.maxThreadsPerMultiProcessor >= prop->maxThreadsPerMultiProcessor ) {
matchedPropCount++;
}
}
if(prop->memoryClockRate != 0) {
inPropCount++;
if(tempProp.memoryClockRate >= prop->memoryClockRate ) {
matchedPropCount++;
}
}
if(inPropCount == matchedPropCount) {
*device = i;
}