Skip to content

Commit ab0efb4

Browse files
authored
Merge pull request #532 from NVIDIA/anuragd/docs
fix(runtime): Fix document generator failure for non-GPU host machines
2 parents ac65885 + 7609ae9 commit ab0efb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/runtime/DeviceList.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ namespace runtime {
1010
DeviceList::DeviceList() {
1111
int num_devices = 0;
1212
auto status = cudaGetDeviceCount(&num_devices);
13-
TRTORCH_ASSERT((status == cudaSuccess), "Unable to read CUDA capable devices. Return status: " << status);
13+
if (status != cudaSuccess) {
14+
LOG_WARNING("Unable to read CUDA capable devices. Return status: " << status);
15+
}
16+
1417
for (int i = 0; i < num_devices; i++) {
1518
device_list[i] = CudaDevice(i, nvinfer1::DeviceType::kGPU);
1619
}

0 commit comments

Comments
 (0)