Skip to content

Commit 5eb8f11

Browse files
committed
Fix CPU only platforms
1 parent eb50268 commit 5eb8f11

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CLW/CLWPlatform.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ void CLWPlatform::InitDeviceList(cl_device_type type) const
168168
{
169169
cl_uint numDevices = 0;
170170
cl_int status = clGetDeviceIDs(*this, type, 0, nullptr, &numDevices);
171+
172+
if (status == CL_DEVICE_NOT_FOUND)
173+
{
174+
return;
175+
}
176+
171177
ThrowIf(status != CL_SUCCESS, status, "clGetDeviceIDs failed");
172178

173179
std::vector<cl_device_id> deviceIds(numDevices);

0 commit comments

Comments
 (0)