Skip to content

Commit 47ca181

Browse files
authored
fix mac build error (#8856)
1 parent f3cdeb9 commit 47ca181

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddle/fluid/inference/tests/test_helper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ void TestInference(const std::string& dirname,
110110
// Users can get the device_id using:
111111
// int device_id = place.GetDeviceId();
112112
paddle::platform::SetDeviceId(0);
113+
#else
114+
PADDLE_THROW("'CUDAPlace' is not supported in CPU only device.");
113115
#endif
114116
}
115117

0 commit comments

Comments
 (0)