corrected hipDeviceGetProperties to hipGetDeviceProperties - not docs
[ROCm/hip commit: d3ba2b9782]
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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, "
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user