From 5e6dbafb3273dbfce96aaf84174e6e65bbcda699 Mon Sep 17 00:00:00 2001 From: SamBro2901 Date: Wed, 19 Aug 2026 12:49:55 +0200 Subject: [PATCH] feat: add TDP for Intel Core Ultra 9 285K Adds the missing entry to cpu_power.csv so estimation mode uses the correct 125W base TDP instead of falling back to the generic 4W/thread default, plus a registry-match test covering the raw cpuinfo string reported for this CPU. --- codecarbon/data/hardware/cpu_power.csv | 1 + tests/test_cpu.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/codecarbon/data/hardware/cpu_power.csv b/codecarbon/data/hardware/cpu_power.csv index 25aae653d..4c4cd4e3d 100644 --- a/codecarbon/data/hardware/cpu_power.csv +++ b/codecarbon/data/hardware/cpu_power.csv @@ -3159,6 +3159,7 @@ Intel Core m5-6Y57,4.0 Intel Core m7-6Y75,4.0 Intel Core i7-2720QM,45 Intel Core i7-2760QM,45 +Intel Core Ultra 9 285K,125.0 Intel EP80579 Integrated,20.0 "Intel EP80579 Integrated, 1066 MHz",18.0 "Intel EP80579 Integrated, 1200 MHz",19.0 diff --git a/tests/test_cpu.py b/tests/test_cpu.py index ae672c6fa..127847d6a 100644 --- a/tests/test_cpu.py +++ b/tests/test_cpu.py @@ -388,6 +388,11 @@ def test_get_cpu_power_from_registry(self): model = "AMD Ryzen Threadripper 1950X 16-Core Processor" self.assertEqual(tdp._get_cpu_power_from_registry(model), 180) + def test_get_cpu_power_from_registry_ultra_9_285k(self): + tdp = TDP() + model = "Intel(R) Core(TM) Ultra 9 285K" + self.assertEqual(tdp._get_cpu_power_from_registry(model), 125) + def test_get_cpu_power_from_registry_returns_none_without_match(self): tdp = TDP.__new__(TDP) with (