Skip to content

Commit 5694a01

Browse files
committed
print warning when compiled without cuda and dumping gpu devices
1 parent d9c31ed commit 5694a01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Intern/rayx-core/src/Tracer/DeviceConfig.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ void DeviceConfig::dumpDevices() const {
130130
const auto& device = devices[i];
131131
RAYX_LOG << "Device - index: " << i << ", type: " << deviceTypeToString(device.type) << ", name: " << device.name;
132132
}
133+
134+
if (m_fetchedDeviceType != DeviceType::Cpu) {
135+
#if !defined(RAYX_CUDA_ENABLED) && !defined(RAYX_HIP_ENABLED)
136+
RAYX_WARN << "No GPU support was compiled in this build.";
137+
#endif
138+
}
133139
}
134140

135141
size_t DeviceConfig::enabledDevicesCount() const {

0 commit comments

Comments
 (0)