You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running codecarbon on a Raspberry Pi 5, and the CPU (and Hailo AI acceleration device) are not recognized.
[codecarbon INFO @ 16:09:26] Codecarbon is taking the configuration from global file: /home/pi/.codecarbon.config
[codecarbon INFO @ 16:09:26] [setup] RAM Tracking...
[codecarbon INFO @ 16:09:26] [setup] CPU Tracking...
[codecarbon WARNING @ 16:09:26] No CPU tracking mode found. Falling back on CPU constant mode.
Linux OS detected: Please ensure RAPL files exist at \sys\class\powercap\intel-rapl to measure CPU
[codecarbon WARNING @ 16:09:26] We saw that you have a Cortex-A76 but we don't know it. Please contact us.
[codecarbon INFO @ 16:09:26] CPU Model on constant consumption mode: Cortex-A76
[codecarbon INFO @ 16:09:26] [setup] GPU Tracking...
[codecarbon INFO @ 16:09:26] No GPU found.
[codecarbon INFO @ 16:09:26] >>> Tracker's metadata:
[codecarbon INFO @ 16:09:26] Platform system: Linux-6.6.62+rpt-rpi-2712-aarch64-with-glibc2.36
[codecarbon INFO @ 16:09:26] Python version: 3.11.2
[codecarbon INFO @ 16:09:26] CodeCarbon version: 2.8.3
[codecarbon INFO @ 16:09:26] Available RAM : 7.860 GB
[codecarbon INFO @ 16:09:26] CPU count: 4
[codecarbon INFO @ 16:09:26] CPU model: Cortex-A76
[codecarbon INFO @ 16:09:26] GPU count: None
[codecarbon INFO @ 16:09:26] GPU model: None
[codecarbon INFO @ 16:09:29] Saving emissions data to file emissions.csv
[codecarbon INFO @ 16:09:29]
Graceful stopping: collecting and writing information.
Please wait a few seconds...
[codecarbon INFO @ 16:09:29] Energy consumed for RAM : 0.000000 kWh. RAM Power : 2.9473571777343754 W
[codecarbon INFO @ 16:09:29] Energy consumed for all CPUs : 0.000000 kWh. Total CPU Power : 42.5 W
[codecarbon INFO @ 16:09:29] 0.000000 kWh of electricity used since the beginning.
[codecarbon INFO @ 16:09:29] Done!
Furthermore, this folder doesn't exist on the system /sys/class/powercap.
[codecarbon INFO @ 13:05:17] Codecarbon is taking the configuration from global file: /home/pi/.codecarbon.config
[codecarbon WARNING @ 13:05:17] Error while trying to count physical CPUs: invalid literal for int() with base 10: '-'. Defaulting to 1.
[codecarbon INFO @ 13:05:17] [setup] RAM Tracking...
[codecarbon INFO @ 13:05:17] [setup] CPU Tracking...
[codecarbon WARNING @ 13:05:17] No CPU tracking mode found. Falling back on estimation based on TDP for CPU.
Linux OS detected: Please ensure RAPL files exist at /sys/class/powercap/intel-rapl/subsystem to measure CPU
[codecarbon INFO @ 13:05:17] CPU Model on constant consumption mode: Cortex-A76
[codecarbon WARNING @ 13:05:17] No CPU tracking mode found. Falling back on CPU constant mode.
[codecarbon INFO @ 13:05:17] [setup] GPU Tracking...
[codecarbon INFO @ 13:05:17] No GPU found.
[codecarbon INFO @ 13:05:17] >>> Tracker's metadata:
[codecarbon INFO @ 13:05:17] Platform system: Linux-6.6.62+rpt-rpi-2712-aarch64-with-glibc2.36
[codecarbon INFO @ 13:05:17] Python version: 3.11.2
[codecarbon INFO @ 13:05:17] CodeCarbon version: 3.0.0_rc4
[codecarbon INFO @ 13:05:17] Available RAM : 7.860 GB
[codecarbon INFO @ 13:05:17] CPU count: 4 thread(s) in 1 physical CPU(s)
[codecarbon INFO @ 13:05:17] CPU model: Cortex-A76
[codecarbon INFO @ 13:05:17] GPU count: None
[codecarbon INFO @ 13:05:17] GPU model: None
[codecarbon INFO @ 13:05:18] Saving emissions data to file /home/pi/Documents/green-ai-bench/data/raw/cpu_inference_emissions.csv
[codecarbon INFO @ 13:05:18]
Graceful stopping: collecting and writing information.
Please wait a few seconds...
[codecarbon INFO @ 13:05:18] Energy consumed for RAM : 0.000000 kWh. RAM Power : 2.9473571777343754 W
[codecarbon INFO @ 13:05:18] Delta energy consumed for CPU with constant : 0.000000 kWh, power : 6.0 W
[codecarbon INFO @ 13:05:18] Energy consumed for All CPU : 0.000000 kWh
[codecarbon INFO @ 13:05:18] 0.000000 kWh of electricity used since the beginning.
[codecarbon INFO @ 13:05:18] Done!
And from the master branch (codecarbon-2.8.3):
[codecarbon INFO @ 13:17:32] Codecarbon is taking the configuration from global file: /home/pi/.codecarbon.config
[codecarbon INFO @ 13:17:32] [setup] RAM Tracking...
[codecarbon INFO @ 13:17:32] [setup] CPU Tracking...
[codecarbon WARNING @ 13:17:32] No CPU tracking mode found. Falling back on CPU constant mode.
Linux OS detected: Please ensure RAPL files exist at \sys\class\powercap\intel-rapl to measure CPU
[codecarbon WARNING @ 13:17:32] We saw that you have a Cortex-A76 but we don't know it. Please contact us.
[codecarbon INFO @ 13:17:32] CPU Model on constant consumption mode: Cortex-A76
[codecarbon INFO @ 13:17:32] [setup] GPU Tracking...
[codecarbon INFO @ 13:17:32] No GPU found.
[codecarbon INFO @ 13:17:32] >>> Tracker's metadata:
[codecarbon INFO @ 13:17:32] Platform system: Linux-6.6.62+rpt-rpi-2712-aarch64-with-glibc2.36
[codecarbon INFO @ 13:17:32] Python version: 3.11.2
[codecarbon INFO @ 13:17:32] CodeCarbon version: 2.8.3
[codecarbon INFO @ 13:17:32] Available RAM : 7.860 GB
[codecarbon INFO @ 13:17:32] CPU count: 4
[codecarbon INFO @ 13:17:32] CPU model: Cortex-A76
[codecarbon INFO @ 13:17:32] GPU count: None
[codecarbon INFO @ 13:17:32] GPU model: None
[codecarbon INFO @ 13:17:33] Saving emissions data to file /home/pi/Documents/green-ai-bench/data/raw/cpu_inference_emissions.csv
[codecarbon INFO @ 13:17:33]
Graceful stopping: collecting and writing information.
Please wait a few seconds...
[codecarbon INFO @ 13:17:33] Energy consumed for RAM : 0.000000 kWh. RAM Power : 2.9473571777343754 W
[codecarbon INFO @ 13:17:33] Energy consumed for all CPUs : 0.000001 kWh. Total CPU Power : 42.5 W
[codecarbon INFO @ 13:17:33] 0.000001 kWh of electricity used since the beginning.
[codecarbon INFO @ 13:17:33] Done!
If you managed to get a reading with a Rpi, can you please advice @prmths128@benoit-cty?
Hello,
I've pushed a new branch feat/rpi_powerhttps://github.com/mlco2/codecarbon/tree/feat/rpi_power
to add power metrics for raspberry using their tools ; can you try it ?
It should give proper readings for CPU and RAM.
I tried out the feat/rpi_power branch. It seems the CPU is now getting recognised, but I'm getting zeros for the energy usage. Did you manage to get a reading on a Raspberry Pi, which version?
[codecarbon INFO @ 15:42:28] Codecarbon is taking the configuration from global file: /home/pi/.codecarbon.config
[codecarbon INFO @ 15:42:28] [setup] RAM Tracking...
[codecarbon INFO @ 15:42:28] [setup] CPU Tracking...
[codecarbon INFO @ 15:42:28] Tracking CPU via raspberry utils
[codecarbon INFO @ 15:42:28] [setup] GPU Tracking...
[codecarbon INFO @ 15:42:28] No GPU found.
[codecarbon INFO @ 15:42:28] >>> Tracker's metadata:
[codecarbon INFO @ 15:42:28] Platform system: Linux-6.6.62+rpt-rpi-2712-aarch64-with-glibc2.36
[codecarbon INFO @ 15:42:28] Python version: 3.10.0
[codecarbon INFO @ 15:42:28] CodeCarbon version: 2.8.3
[codecarbon INFO @ 15:42:28] Available RAM : 7.860 GB
[codecarbon INFO @ 15:42:28] CPU count: 4
[codecarbon INFO @ 15:42:28] CPU model: Cortex-A76
[codecarbon INFO @ 15:42:28] GPU count: None
[codecarbon INFO @ 15:42:28] GPU model: None
[codecarbon INFO @ 15:42:29] Emissions data (if any) will be saved to file /home/pi/Documents/green-ai-bench/data/raw/cpu_inference_emissions.csv
[codecarbon INFO @ 15:42:29]
Graceful stopping: collecting and writing information.
Please wait a few seconds...
[codecarbon INFO @ 15:42:29] Energy consumed for RAM : 0.000000 kWh. RAM Power : 2.9473571777343754 W
[codecarbon INFO @ 15:42:29] Energy consumed for all CPUs : 0.000000 kWh. Total CPU Power : 5.953340186965816 W
[codecarbon INFO @ 15:42:29] Energy consumed for RAMs : 0.000000 kWh. Total RAM Power : 0.047042817949260005 W
[codecarbon INFO @ 15:42:29] 0.000000 kWh of electricity used since the beginning.
[codecarbon INFO @ 15:42:29] Done!
CodeCarbon is going in an infinite loop to monitor this machine.
[codecarbon INFO @ 17:40:53] [setup] RAM Tracking...
[codecarbon INFO @ 17:40:53] [setup] CPU Tracking...
[codecarbon INFO @ 17:40:53] Tracking CPU via raspberry utils
[codecarbon INFO @ 17:40:53] [setup] GPU Tracking...
[codecarbon INFO @ 17:40:53] No GPU found.
[codecarbon INFO @ 17:40:53] >>> Tracker's metadata:
[codecarbon INFO @ 17:40:53] Platform system: Linux-6.6.51+rpt-rpi-v8-aarch64-with-glibc2.40
[codecarbon INFO @ 17:40:53] Python version: 3.13.1
[codecarbon INFO @ 17:40:53] CodeCarbon version: 2.8.3
[codecarbon INFO @ 17:40:53] Available RAM : 7.759 GB
[codecarbon INFO @ 17:40:53] CPU count: 4
[codecarbon INFO @ 17:40:53] CPU model: Cortex-A76
[codecarbon INFO @ 17:40:53] GPU count: None
[codecarbon INFO @ 17:40:53] GPU model: None
[codecarbon INFO @ 17:40:56] Emissions data (if any) will be saved to file /mnt/sda1/codecarbon/emissions.csv
[codecarbon INFO @ 17:40:58] measuring from hardware=Raspberry (Cortex-A76 > RAM)
[codecarbon INFO @ 17:40:58] Energy consumed for RAMs : 0.000000 kWh. Total RAM Power : 0.00648188698122 W
[codecarbon INFO @ 17:40:58] measuring from hardware=Raspberry (Cortex-A76 > CPU)
[codecarbon INFO @ 17:40:58] Energy consumed for all CPUs : 0.000001 kWh. Total CPU Power : 1.60725786863836 W
[codecarbon INFO @ 17:40:58] 0.000001 kWh of electricity used since the beginning.
[codecarbon INFO @ 17:41:00] measuring from hardware=Raspberry (Cortex-A76 > RAM)
[codecarbon INFO @ 17:41:00] Energy consumed for RAMs : 0.000000 kWh. Total RAM Power : 0.006475451698800001 W
[codecarbon INFO @ 17:41:00] measuring from hardware=Raspberry (Cortex-A76 > CPU)
[codecarbon INFO @ 17:41:00] Energy consumed for all CPUs : 0.000002 kWh. Total CPU Power : 1.7625656386553101 W
[codecarbon INFO @ 17:41:00] 0.000002 kWh of electricity used since the beginning.
I've added a new version with some logging to the commit (branch feat/rpi_power ) to check the measure used, it shows measuring from hardware... and should show the raspberry hardware for CPU/RAM like above.
Activity
benoit-cty commentedon Feb 27, 2025
Hello,
Thanks, we may support it with https://github.com/librerpi/rpi-tools/blob/master/pi5_voltage.py
@prmths128 has recently done some test using CodeCarbon on a Rpi.
benoit-cty commentedon Feb 28, 2025
Can you both have a look to #791 and tell me if the TDP seems OK ?
FrejaThoresen commentedon Mar 3, 2025
Hello,
I've run tests with the master branch and PR #791.
From the PR #791 (
codecarbon-3.0.0rc4)And from the master branch (
codecarbon-2.8.3):If you managed to get a reading with a Rpi, can you please advice @prmths128 @benoit-cty?
Many thanks!
prmths128 commentedon Mar 9, 2025
Hello,
I've pushed a new branch
feat/rpi_powerhttps://github.com/mlco2/codecarbon/tree/feat/rpi_powerto add power metrics for raspberry using their tools ; can you try it ?
It should give proper readings for CPU and RAM.
FrejaThoresen commentedon Mar 13, 2025
Hello,
I tried out the
feat/rpi_powerbranch. It seems the CPU is now getting recognised, but I'm getting zeros for the energy usage. Did you manage to get a reading on a Raspberry Pi, which version?Cheers,
prmths128 commentedon Mar 16, 2025
Hello,
I'm not sure the correct version is called.
With this command:
I'm getting:
I've added a new version with some logging to the commit (branch
feat/rpi_power) to check the measure used, it showsmeasuring from hardware...and should show the raspberry hardware for CPU/RAM like above.FrejaThoresen commentedon Mar 18, 2025
Hello,
Thanks for the help, I think it works now.
Cheers!
prmths128 commentedon Mar 19, 2025
Ok, cool!
You can keep using the branch for the moment, i'll close the ticket when it's finished and merged.