Fix devices 'not undefined' error.

intel-update-authors
wanghaoshuang 7 years ago
parent 3d96b3811a
commit ad3f6f4ad5

@ -70,8 +70,8 @@ void InitP2P(std::vector<int> devices) {
void InitDevices(bool init_p2p) {
/*Init all available devices by default */
#ifdef PADDLE_WITH_CUDA
std::vector<int> devices;
#ifdef PADDLE_WITH_CUDA
try {
int count = platform::GetCUDADeviceCount();
for (int i = 0; i < count; ++i) {

Loading…
Cancel
Save