Skip to content

Commit ad3f6f4

Browse files
committed
Fix devices 'not undefined' error.
1 parent 3d96b38 commit ad3f6f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/framework/init.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ void InitP2P(std::vector<int> devices) {
6969
}
7070

7171
void InitDevices(bool init_p2p) {
72-
/*Init all available devices by default */
73-
#ifdef PADDLE_WITH_CUDA
72+
/*Init all available devices by default */
7473
std::vector<int> devices;
74+
#ifdef PADDLE_WITH_CUDA
7575
try {
7676
int count = platform::GetCUDADeviceCount();
7777
for (int i = 0; i < count; ++i) {

0 commit comments

Comments
 (0)