diff --git a/lib/nvml.py b/lib/nvml.py index 05dbcbc..6ecb307 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 = round(gpu_oc_config["core"]*2) + wanted_core_clock = int(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 = round(gpu_oc_config["mem"]*2) + wanted_mem_clock = int(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_mem_clock) + pynvml.nvmlDeviceSetMemClkVfOffset(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: