fix a minor bug on reporting the selected device.

This commit is contained in:
2022-10-31 17:49:20 +01:00
parent 48f6f9c25e
commit ee33aacdd6

View File

@ -245,7 +245,7 @@ int CudaBase::cuda_setDevice(int device) {
std::cout << "Init: " << device << "\t" << ndev << std::endl; std::cout << "Init: " << device << "\t" << ndev << std::endl;
if (device < ndev) { if (device < ndev) {
std::cout << "set device to: " << ndev << std::endl; std::cout << "set device to: " << device << std::endl;
cudaSetDevice(device); cudaSetDevice(device);
} else { } else {
if (ndev > 0) if (ndev > 0)