Feat: print and redetect gpu devices on DEVICE_NOT_FOUND error
This commit is contained in:
committed by
Sheepit Renderfarm
parent
d2f202de5c
commit
617e1c1a90
@@ -64,6 +64,8 @@ import com.sheepit.client.exception.SheepItExceptionSessionDisabled;
|
||||
import com.sheepit.client.exception.SheepItExceptionSessionDisabledDenoisingNotSupported;
|
||||
import com.sheepit.client.exception.SheepItExceptionWithRequiredWait;
|
||||
import com.sheepit.client.hardware.cpu.CPU;
|
||||
import com.sheepit.client.hardware.gpu.GPU;
|
||||
import com.sheepit.client.hardware.gpu.GPUDevice;
|
||||
import com.sheepit.client.logger.Log;
|
||||
import com.sheepit.client.network.DownloadItem;
|
||||
import com.sheepit.client.network.DownloadManager;
|
||||
@@ -823,6 +825,33 @@ import okhttp3.HttpUrl;
|
||||
|
||||
if (err != Error.Type.OK) {
|
||||
this.log.error("Client::work problem with runRenderer (ret " + err + ")");
|
||||
|
||||
if (err == Error.Type.DETECT_DEVICE_ERROR) {
|
||||
this.log.error("Available devices are: ");
|
||||
|
||||
if (configuration.getGPUDevice() != null && configuration.getComputeMethod() != Configuration.ComputeType.CPU) {
|
||||
this.log.error("Configured device: " + String.format("%s %s %.1f GB VRAM (driver: %s)",
|
||||
configuration.getGPUDevice().getId(),
|
||||
configuration.getGPUDevice().getModel(),
|
||||
configuration.getGPUDevice().getMemory() / 1024.0 / 1024.0 / 1024.0,
|
||||
configuration.getGPUDevice().getDriverVersion())
|
||||
);
|
||||
}
|
||||
|
||||
this.log.error("Redetecting devices...");
|
||||
GPU.generate();
|
||||
this.log.error("Detected devices:");
|
||||
List<GPUDevice> gpus = GPU.listDevices(configuration);
|
||||
|
||||
for (GPUDevice gpu : gpus) {
|
||||
this.log.error(String.format("%s %s %.1f GB VRAM (driver: %s)",
|
||||
gpu.getId(),
|
||||
gpu.getModel(),
|
||||
gpu.getMemory() / 1024.0 / 1024.0 / 1024.0,
|
||||
gpu.getDriverVersion())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.state = State.UNKNOWN;
|
||||
return err;
|
||||
@@ -909,7 +938,7 @@ import okhttp3.HttpUrl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!rendererPathFile.exists()) {
|
||||
// we create the directory
|
||||
rendererPathFile.mkdir();
|
||||
|
||||
Reference in New Issue
Block a user