From 9e41226603d3d29c3bd9226577a9a3daf2efe363 Mon Sep 17 00:00:00 2001 From: clore Date: Fri, 10 May 2024 01:21:27 +0000 Subject: [PATCH] clocks x2 standard linux multiplier, fix nvmlDeviceSetGpcClkVfOffset --- lib/nvml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nvml.py b/lib/nvml.py index 8025389..05dbcbc 100644 --- a/lib/nvml.py +++ b/lib/nvml.py @@ -239,15 +239,15 @@ def set_oc(settings): gpu_possible_ranges = all_gpus_data_list[oc_gpu_index] gpu_handle = pynvml.nvmlDeviceGetHandleByIndex(oc_gpu_index) if "core" in gpu_oc_config: - wanted_core_clock = gpu_oc_config["core"] + wanted_core_clock = round(gpu_oc_config["core"]*2) if gpu_possible_ranges["core"][0] <= wanted_core_clock and wanted_core_clock <= gpu_possible_ranges["core"][1]: pynvml.nvmlDeviceSetGpcClkVfOffset(gpu_handle, wanted_core_clock) else: log.error(f"Requested OC for GPU:{oc_gpu_index} (CORE) out of bound | {wanted_core_clock} | [{gpu_possible_ranges["core"][0]}, {gpu_possible_ranges["core"][1]}]") if "mem" in gpu_oc_config: - wanted_mem_clock = gpu_oc_config["mem"] + wanted_mem_clock = round(gpu_oc_config["mem"]*2) if gpu_possible_ranges["mem"][0] <= wanted_mem_clock and wanted_mem_clock <= gpu_possible_ranges["mem"][1]: - pynvml.nvmlDeviceSetGpcClkVfOffset(gpu_handle, wanted_core_clock) + pynvml.nvmlDeviceSetGpcClkVfOffset(gpu_handle, wanted_mem_clock) else: log.error(f"Requested OC for GPU:{oc_gpu_index} (MEMORY) out of bound | {wanted_mem_clock} | [{gpu_possible_ranges["mem"][0]}, {gpu_possible_ranges["mem"][1]}]") if "pl" in gpu_oc_config: