Add ROCm SMI backend for AMD GPU support

This commit is contained in:
romner-set
2023-05-15 19:42:55 +02:00
parent 917d568a77
commit c352bf2613
6 changed files with 243 additions and 79 deletions

View File

@@ -262,6 +262,7 @@ void clean_quit(int sig) {
}
Gpu::Nvml::shutdown();
Gpu::Rsmi::shutdown();
Config::write();
@@ -537,7 +538,7 @@ namespace Runner {
if (Global::debug) debug_timer("gpu", draw_begin);
//? Draw box
if (not pause_output and Gpu::Nvml::initialized) output += Gpu::draw(gpus, conf.force_redraw, conf.no_update);
if (not pause_output and not Gpu::gpu_names.empty()) output += Gpu::draw(gpus, conf.force_redraw, conf.no_update);
if (Global::debug) debug_timer("gpu", draw_done);
}