corrected hipDeviceGetProperties to hipGetDeviceProperties - not docs

[ROCm/hip commit: d3ba2b9782]
This commit is contained in:
Aditya Atluri
2016-03-06 08:31:04 -06:00
parent 3c91a6d0a7
commit f1b8758919
24 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
hipSetDevice(device);
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, device);
hipGetDeviceProperties(&devProp, device);
if (devProp.major < 1) {
printf("%d does not support HIP\n", device);
return -1;
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
int deviceId;
CHECK (hipGetDevice(&deviceId));
hipDeviceProp_t props;
CHECK(hipDeviceGetProperties(&props, deviceId));
CHECK(hipGetDeviceProperties(&props, deviceId));
printf ("info: running on device #%d %s\n", deviceId, props.name);
CHECK(test_hipDeviceGetAttribute(deviceId, hipDeviceAttributeMaxThreadsPerBlock, props.maxThreadsPerBlock));
+1 -1
View File
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
int deviceId;
CHECK (hipGetDevice(&deviceId));
hipDeviceProp_t props;
CHECK(hipDeviceGetProperties(&props, deviceId));
CHECK(hipGetDeviceProperties(&props, deviceId));
printf ("info: running on device #%d %s\n", deviceId, props.name);
#ifdef __HCC__
+1 -1
View File
@@ -15,7 +15,7 @@ float *Ad, *Bd, *Cd;
hipDeviceProp_t prop;
int device;
HIPCHECK(hipGetDevice(&device));
HIPCHECK(hipDeviceGetProperties(&prop, device));
HIPCHECK(hipGetDeviceProperties(&prop, device));
if(prop.canMapHostMemory != 1){
std::cout<<"Exiting..."<<std::endl;
}
@@ -258,7 +258,7 @@ void runTest(int argc, char **argv)
deviceProp.minor = 0;
int dev = 0;
hipDeviceGetProperties(&deviceProp, dev);
hipGetDeviceProperties(&deviceProp, dev);
// Statistics about the GPU device
printf("> GPU device has %d Multi-Processors, "
+1 -1
View File
@@ -41,7 +41,7 @@ __global__ void
int main(int argc, char *argv[])
{ int warpSize, pshift;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
if(strncmp(devProp.name,"Fiji",1)==0)
{ warpSize =64;
pshift =6;
+1 -1
View File
@@ -21,7 +21,7 @@ __global__ void
int main(int argc, char *argv[])
{ int warpSize, pshift;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
if(strncmp(devProp.name,"Fiji",1)==0)
{warpSize = 64; pshift =6;}
+1 -1
View File
@@ -94,7 +94,7 @@ int main() {
unsigned long long int* deviceD;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
cout << " System minor " << devProp.minor << endl;
cout << " System major " << devProp.major << endl;
cout << " agent prop name " << devProp.name << endl;
+1 -1
View File
@@ -118,7 +118,7 @@ int main() {
long long int* deviceH;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
cout << " System minor " << devProp.minor << endl;
cout << " System major " << devProp.major << endl;
cout << " agent prop name " << devProp.name << endl;
+1 -1
View File
@@ -89,7 +89,7 @@ int main() {
unsigned long long int* deviceD;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
cout << " System minor " << devProp.minor << endl;
cout << " System major " << devProp.major << endl;
cout << " agent prop name " << devProp.name << endl;
+1 -1
View File
@@ -86,7 +86,7 @@ int main() {
unsigned long long int* deviceD;
hipDeviceProp_t devProp;
hipDeviceGetProperties(&devProp, 0);
hipGetDeviceProperties(&devProp, 0);
cout << " System minor " << devProp.minor << endl;
cout << " System major " << devProp.major << endl;
cout << " agent prop name " << devProp.name << endl;
+1 -1
View File
@@ -144,7 +144,7 @@ unsigned setNumBlocks(unsigned blocksPerCU, unsigned threadsPerBlock, size_t N)
int device;
HIPCHECK(hipGetDevice(&device));
hipDeviceProp_t props;
HIPCHECK(hipDeviceGetProperties(&props, device));
HIPCHECK(hipGetDeviceProperties(&props, device));
unsigned blocks = props.multiProcessorCount * blocksPerCU;
if (blocks * threadsPerBlock > N) {