Fix tests to read warpSize from device props.

Change-Id: I9583577793afad49f9eb1ee9069bd4c6963a6023
This commit is contained in:
Ben Sander committed 2016-11-06 04:26:28 -06:00
1 parent 0e5cfed3eb
commit a13ec441bf
2 file changed
+14 -8

No files matched your search

+5 -3
View File
@@ -48,9 +48,11 @@ int main(int argc, char *argv[])
hipDeviceProp_t devProp;
hipGetDeviceProperties(&devProp, 0);
if(strncmp(devProp.name,"Fiji",1)==0)
{warpSize = 64; pshift =6;}
else {warpSize =32; pshift =5;}
warpSize = devProp.warpSize;
int w = warpSize;
pshift = 0;
while (w >>= 1) ++pshift;
unsigned int Num_Threads_per_Block = 512;
unsigned int Num_Blocks_per_Grid = 1;