minor chnages in GPU samples
This commit is contained in:
parent
bbffbe904a
commit
593fae4c02
@ -50,7 +50,6 @@ CUcontext contexts[2];
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int num_devices = getCudaEnabledDeviceCount();
|
int num_devices = getCudaEnabledDeviceCount();
|
||||||
|
|
||||||
if (num_devices < 2)
|
if (num_devices < 2)
|
||||||
{
|
{
|
||||||
cout << "Two or more GPUs are required\n";
|
cout << "Two or more GPUs are required\n";
|
||||||
@ -69,6 +68,7 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Init CUDA Driver API
|
||||||
safeCall(cuInit(0));
|
safeCall(cuInit(0));
|
||||||
|
|
||||||
// Create context for GPU #0
|
// Create context for GPU #0
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TestSystem(): can_flush_(false), cpu_elapsed_(0), gpu_elapsed_(0),
|
TestSystem(): can_flush_(false), cpu_elapsed_(0), gpu_elapsed_(0),
|
||||||
speedup_total_(0.0), num_subtests_called_(0) {};
|
speedup_total_(0.0), num_subtests_called_(0) {}
|
||||||
|
|
||||||
void flushSubtestData();
|
void flushSubtestData();
|
||||||
|
|
||||||
|
@ -78,7 +78,6 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int num_devices = getCudaEnabledDeviceCount();
|
int num_devices = getCudaEnabledDeviceCount();
|
||||||
|
|
||||||
if (num_devices < 2)
|
if (num_devices < 2)
|
||||||
{
|
{
|
||||||
cout << "Two or more GPUs are required\n";
|
cout << "Two or more GPUs are required\n";
|
||||||
@ -111,6 +110,7 @@ int main(int argc, char** argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Init CUDA Driver API
|
||||||
safeCall(cuInit(0));
|
safeCall(cuInit(0));
|
||||||
|
|
||||||
// Create context for the first GPU
|
// Create context for the first GPU
|
||||||
|
Loading…
x
Reference in New Issue
Block a user