Skip to content

Commit 56ee23f

Browse files
author
benoit-cty
committed
Docs
1 parent d61aff7 commit 56ee23f

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/advanced/adastra.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# CodeCarbon on CINES Adastra HPC with AMD ROCM
1+
# ROCm and PyTorch on SLURM SuperComputer
22

3-
This project was provided with computing and storage resources by GENCI at CINES thanks to the grant AD010615147R1 on the supercomputer Adastra's MI250x/MI300 partition.
3+
This project was provided with computing and storage resources by GENCI at CINES thanks to the grant AD010615147R1 on the [supercomputer Adastra](https://dci.dci-gitlab.cines.fr/webextranet/architecture/index.html)'s MI250x/MI300 partition.
44

55
Thanks to this grant we were able to develop and test the AMD ROCM support in CodeCarbon, and provide this quick start guide to help other users of Adastra HPC to easily monitor the carbon emissions of their machine learning workloads running on AMD GPUs.
66

docs/introduction/power_estimation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ While energy is the metric primarily responsible for CO₂ emissions estimations
77
## 1. Energy as the Source of Truth
88

99
The most accurate tracking methods rely on built-in hardware energy counters rather than instantaneous power draw. For example:
10+
1011
- **NVIDIA GPUs** using `nvmlDeviceGetTotalEnergyConsumption` return accumulated energy in millijoules.
1112
- **AMD GPUs** using `amdsmi_get_energy_count` yield a counter that is multiplied by its resolution and converted into millijoules.
1213
- **CPUs** using the RAPL interface read from files like `energy_uj` to get accumulated microjoules.
@@ -40,6 +41,7 @@ The tracker has designated logic blocks for different components (e.g., CPU, RAM
4041
Inside the main `EmissionsTracker`, the energy values are securely accumulated over the session's lifespan.
4142

4243
For recording the power, a running sum is maintained:
44+
4345
- As CodeCarbon sequentially takes measurements, it tracks the output of `power.W`.
4446
- It dynamically increments running variables like `_gpu_power_sum`, `_cpu_power_sum`, `_ram_power_sum`.
4547
- It increments a global counter `_power_measurement_count`.
@@ -53,6 +55,7 @@ This smoothing process prevents singular short measurement anomalies from skewin
5355
## Summary Pipeline
5456

5557
In short:
58+
5659
1. **Hardware Counters (Accumulated Energy)**
5760
2. Subtract `last_energy` = **Energy Delta**
5861
3. Divide Energy Delta by `last_duration` = **Interval Average Power**

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ nav:
113113
- Motivation: introduction/motivation.md
114114
- Methodology: introduction/methodology.md
115115
- RAPL Metrics: introduction/rapl.md
116+
- Power Estimation: introduction/power_estimation.md
116117
- Model Comparisons: introduction/model_examples.md
117118
- Frequently Asked Questions: introduction/faq.md
118119
- Getting Started:
@@ -121,11 +122,11 @@ nav:
121122
- CodeCarbon API: getting-started/api.md
122123
- Parameters: getting-started/parameters.md
123124
- Examples: getting-started/examples.md
124-
- Comet Integration: getting-started/comet.md
125125
- Test on Scaleway: getting-started/test_on_scaleway.md
126126
- Advanced Usage:
127-
- Linux service: advanced/advanced_installation.md
127+
- Install CodeCarbon as a Linux service: advanced/linux_service.md
128128
- Deploy with Ansible: advanced/ansible.md
129+
- Comet Integration: getting-started/comet.md
129130
- ROCm and PyTorch on SLURM SuperComputer: advanced/adastra.md
130131
- Logging:
131132
- Output: logging/output.md

0 commit comments

Comments
 (0)