lfwa / carbontracker

Track and predict the energy consumption and carbon footprint of training deep learning models.
MIT License
374 stars 27 forks source link

Check if device supports RAPL #28

Closed AndySAnker closed 4 years ago

AndySAnker commented 4 years ago

Thx for a great module!

When I run the code, I get the following error: "No components were available. CarbonTracker supports Intel CPUs with the RAPL interface and NVIDIA GPUs." My computer has the processor Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz 2.11 GHz.

Is there any way I can check, if the CPU supports the RAPL interface?

lfwa commented 4 years ago

What OS are you on?

The Intel RAPL interface should be supported on most Intel CPUs released during and after the Sandy Bridge generation. However, it may only be available on some Linux distributions (otherwise we would have to require specific user priviliges such as root access.) If you have any folders in the /sys/class/powercap/ directory then RAPL should be supported.

AndySAnker commented 4 years ago

Thanks for your reply.

I am using a Lenovo with Windows 10. I can see that I do not have the /sys/class/powercap/ directory. So I guess it is not supported.

kanding commented 4 years ago

Hey Andy - thanks a lot for trying out the tool!

Yes unfortunately at the moment we do not have a way of measuring Intel CPUs on Windows without requiring user access privileges. Nvidia GPUs should be found.

We'd love to be able to support Windows fully, so it is definitely a long-term goal for us!

AndySAnker commented 4 years ago

That sounds great! We will also run our code on Nvidia at some point, so it is not a problem, however, sometimes it is just convenient to run the code on a regular laptop. The ignore_error statement is great, we have set that to True, such that we can use it for both :)