From 9ce9f8eb09ed0717d025e8496b1d6f32b92f943d Mon Sep 17 00:00:00 2001 From: clore Date: Fri, 10 May 2024 00:38:45 +0000 Subject: [PATCH] report correct gpu_oc_specs, set default clocks/pl on {} --- clore_hosting/main.py | 2 +- lib/nvml.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/clore_hosting/main.py b/clore_hosting/main.py index 6b7f08a..8eba76c 100644 --- a/clore_hosting/main.py +++ b/clore_hosting/main.py @@ -485,7 +485,7 @@ class CloreClient: log.debug("Submitting \"gpu_oc_specs\"") self.last_oc_service_submit = utils.unix_timestamp() await WebSocketClient.send({ - "set_gpu_info":oc_conf[1], + "set_gpu_info":self.gpu_oc_specs, "xorg_valid": True }) if oc_conf[0] and len(oc_conf[2].keys())>0 and oc_apply_allowed: diff --git a/lib/nvml.py b/lib/nvml.py index 51efdda..8025389 100644 --- a/lib/nvml.py +++ b/lib/nvml.py @@ -221,6 +221,16 @@ def set_oc(settings): try: gpu_count = pynvml.nvmlDeviceGetCount() settings_keys = settings.keys() + if len(settings_keys)==0: # Configure default clocks/pl + settings={} + for i in range(0,gpu_count): + settings[str(i)]={ + "core":0, + "mem":0, + "pl": all_gpus_data_list[i]["default_power_limit"] + } + settings_keys = settings.keys() + log.debug(f"Rewriting settings with: {json.dumps(settings)}") for oc_gpu_index in settings_keys: if oc_gpu_index.isdigit(): oc_gpu_index=int(oc_gpu_index)