Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
254cb89
added amd-smi interface
IlyasMoutawwakil Jan 16, 2024
6196148
fix energy unit
IlyasMoutawwakil Jan 16, 2024
371cc60
use counter_resolution instead of hard coding it
IlyasMoutawwakil Jan 16, 2024
34cea71
wip : handle AMD and Nvidia at the same time
Jan 26, 2024
9fa89b5
added support for amd and nvidia at the same time
IlyasMoutawwakil Jan 29, 2024
8af048e
Fix merge conflict
Feb 18, 2026
cb50806
Upgrade AMDSMI entries
Feb 18, 2026
3bed1bd
Breaking change : Watt
Mar 4, 2026
4813af3
Adastra
Mar 4, 2026
9a1535a
Contributing to a PR
Mar 4, 2026
3cd2b77
fix merge errors
Mar 4, 2026
3d5c496
Warn about dual GCD
Mar 5, 2026
95e03b1
Fix GPU tests
Mar 5, 2026
5fa1f43
Matrix multiplication across all devices
Mar 5, 2026
4964f7b
Warn about dual GCD
Mar 5, 2026
042ce8c
Warn about dual GCD
Mar 5, 2026
bab9105
Docs on power estimation
Mar 5, 2026
fcce50c
Adastra
Mar 5, 2026
46d779d
Docs on power estimation
Mar 5, 2026
3290580
Fix start()
Mar 5, 2026
040df0d
Fix too much call to _get_gpu_ids
Mar 5, 2026
b1ff90f
MI300
Mar 5, 2026
ad5e4f4
Fix _get_power_usage
Mar 5, 2026
f2419d9
Handle SLURM CPU allocation for default TDP
Mar 5, 2026
3529e99
Exclude MI210 single GCD
Mar 5, 2026
38fa868
Remove login sensitive informations
Mar 5, 2026
8bf4ac8
fix tests
Mar 5, 2026
00e27a2
Add tests
Mar 5, 2026
ffa058f
Add test
Mar 7, 2026
fe8259a
wip: refacto GPU
Mar 7, 2026
893883d
wip: refacto GPU
Mar 7, 2026
1f77e58
fix test
Mar 7, 2026
2b3ca2e
Docs and split GPU tests
Mar 7, 2026
2408844
Suggest OffLine mode in the CLI
benoit-cty Mar 8, 2026
9e8c830
Debug log for PUE
benoit-cty Mar 8, 2026
7974e81
pre-commit
benoit-cty Mar 8, 2026
7b4fec7
remove commented lines
benoit-cty Mar 8, 2026
d7f84cc
review on emit_selection_warning
benoit-cty Mar 8, 2026
6ed0ef4
fix test cli
benoit-cty Mar 8, 2026
3df2d6f
doc
benoit-cty Mar 8, 2026
cc1b4d6
fix tests/test_gpu_amd.py
benoit-cty Mar 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ flake8...................................................................Passed

If any of the linters/formatters fail, check the difference with `git diff`, add the differences if there is no behavior changes (isort and black might have change some coding style or import order, this is expected it is their job) with `git add` and finally try to commit again `git commit ...`.

You can also run `pre-commit` with `uv run pre-commit run -v` if you have some changes staged but you are not ready yet to commit.
You can also run `pre-commit` with `uv run pre-commit run --all-file` to check all file.


<!-- TOC --><a name="dependencies-management"></a>
Expand Down Expand Up @@ -363,6 +363,18 @@ cp /data/tests/test_package_integrity.py .
pytest test_package_integrity.py
```

### Contribute to a fork branch

When a user open a PR from a fork, we are allowed to push to the fork branch.

If you want to do so, do the following:

```bash
git remote add <user_name> https://github.com/<user_name>/codecarbon.git
git fetch <user_name> <git_branch>
git checkout -b <git_branch> <user_name>/<git_branch>
```

<!-- TOC --><a name="api-and-dashboard"></a>
## API and Dashboard

Expand Down
5 changes: 3 additions & 2 deletions codecarbon/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ def monitor(
if offline:
if not country_iso_code:
print(
"ERROR: country_iso_code is required for offline mode", file=sys.stderr
"ERROR: Country ISO code is required for offline mode. Add it to your configuration or provide it via the command line: `--country-iso-code FRA`",
file=sys.stderr,
)
raise typer.Exit(1)

Expand All @@ -358,7 +359,7 @@ def monitor(
experiment_id = get_existing_local_exp_id()
if api and experiment_id is None:
print(
"ERROR: No experiment id, call 'codecarbon config' first.",
"ERROR: No experiment id, call 'codecarbon config' first. Or run in offline mode with `--offline --country-iso-code FRA` flag if you don't want to connect to the API.",
file=sys.stderr,
)
raise typer.Exit(1)
Expand Down
4 changes: 2 additions & 2 deletions codecarbon/core/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from codecarbon.core.rapl import RAPLFile
from codecarbon.core.units import Time
from codecarbon.core.util import detect_cpu_model
from codecarbon.core.util import count_cpus, detect_cpu_model
from codecarbon.external.logger import logger
from codecarbon.input import DataSource

Expand Down Expand Up @@ -1001,7 +1001,7 @@ def _main(self) -> Tuple[str, int]:
)
if is_psutil_available():
# Count thread of the CPU
threads = psutil.cpu_count(logical=True)
threads = count_cpus()
estimated_tdp = threads * DEFAULT_POWER_PER_CORE
logger.warning(
f"We will use the default power consumption of {DEFAULT_POWER_PER_CORE} W per thread for your {threads} CPU, so {estimated_tdp}W."
Expand Down
Loading
Loading