Skip to main content

eCAL

Analytical estimation of the energy cost of the AI lifecycle (J/bit).

eCAL computes the total energy consumed across the full AI model lifecycle — data transmission, preprocessing, training, evaluation, and inference — using closed-form FLOP formulas and hardware power profiles.

Published in IEEE Journal on Selected Areas in Communications (JSAC), 2026.

Documentation

Installation

git clone https://github.com/sensorlab/eCAL.git
cd eCAL
pip install -e ".[dev]"

From PyPI

pip install ecal-energy

Dependencies only (legacy)

pip install -r requirements.txt

Quickstart

Python API

import ecal

result = ecal.estimate(
    model_type="MLP",
    model_params={"num_layers": 3, "din": 10, "dout": 2},
    num_samples=1000,
    num_epochs=50,
    hardware="apple_m2",
)

print(f"Total energy: {result['total']:.4f} J")
print(f"eCAL: {result['ecal_j_per_bit']:.2e} J/bit")

CLI

# Estimate energy for an MLP
ecal estimate --model MLP --layers 3 --epochs 50 --hardware apple_m2

# JSON output
ecal estimate --model Transformer --layers 6 --hardware nvidia_h100_sxm --json

# List available hardware profiles
ecal profiles

# Version
ecal --version

Legacy (RunCalculator.py)

# Edit configs/CalculatorConfig.py, then:
python RunCalculator.py

Supported Models

Model FLOP Calculator Key Parameters
MLP MLPCalculator num_layers, din, dout
CNN CNNCalculator num_cnv_layers, num_pool_layers, i_r, k_r
KAN KANCalculator num_layers, grid_size, din, dout
Transformer TransformerCalculator context_length, embedding_size, num_heads, num_decoder_blocks

Hardware Profiles

Profile FP32 FLOPS TDP (W) Device
apple_m2 3.6 TFLOPS 22 mps
nvidia_a100_80gb 19.5 TFLOPS 400 cuda
nvidia_h100_sxm 67 TFLOPS 700 cuda
generic_cpu 1 TFLOPS 100 cpu
generic_edge 0.01 TFLOPS 15 cpu

Architecture

                    ecal.estimate()
                         |
        +--------+-------+-------+--------+
        |        |       |       |        |
  Transmission  Preproc  Training  Eval  Inference
        |        |       |       |        |
        v        v       v       v        v
   Protocol   FLOP    FLOP     FLOP    FLOP
   Configs   Calcs   Calcs    Calcs   Calcs
                     (per model type)
                         |
                    Hardware Profile
                   (FLOPS, power, TDP)
                         |
                   Energy = time * power
                         |
                  eCAL = total_E / total_bits

Configuration

Protocol configs are in configs/ProtocolConfigs.py — supports 7 OSI layers with multiple protocol options (HTTP, TCP, IPv4, WiFi, Bluetooth, etc.).

Calculator parameters are in configs/CalculatorConfig.py for the legacy RunCalculator.py interface.

Development

pip install -e ".[dev]"
pytest                    # run tests
ruff check src/ tests/    # lint
mypy src/ecal/            # type check

Citation

If you use this tool please cite our paper:

@ARTICLE{11298182,
  author={Chou, Shih-Kai and Hribar, Jernej and Hanžel, Vid and Mohorčič, Mihael and Fortuna, Carolina},
  journal={IEEE Journal on Selected Areas in Communications},
  title={The Energy Cost of Artificial Intelligence Lifecycle in Communication Networks},
  year={2026},
  volume={44},
  number={},
  pages={2427-2443},
  keywords={Artificial intelligence;Measurement;Costs;Energy consumption;Carbon dioxide;Training;Standards;Data centers;Open systems;Energy efficiency;AI model lifecycle;energy consumption;carbon footprint;metric;methodology},
  doi={10.1109/JSAC.2025.3642835}}

Other related work:

@INPROCEEDINGS{11349371,
  author={Chou, Shih-Kai and Hribar, Jernej and Bertalanič, Blaž and Mohorčič, Mihael and Lagkas, Thomas and Sarigiannidis, Panagiotis and Fortuna, Carolina},
  booktitle={2025 IEEE Conference on Network Function Virtualization and Software-Defined Networking (NFV-SDN)},
  title={Energy Cost of the AI/ML Workflow in O-RAN},
  year={2025},
  volume={},
  number={},
  pages={1-6},
  keywords={Training;Measurement;Adaptation models;Costs;Open RAN;Hardware;Energy efficiency;Complexity theory;Artificial intelligence;Optimization;sustainable 6G networks;O-RAN;AI/ML Workflow;eCAL;lifecycle;energy;Carbon Footprint},
  doi={10.1109/NFV-SDN66355.2025.11349371}}
@INPROCEEDINGS{10849732,
  author={Chou, Shih-Kai and Hribar, Jernej and Mohorčič, Mihael and Fortuna, Carolina},
  booktitle={2024 IEEE Conference on Standards for Communications and Networking (CSCN)},
  title={Towards the Standardization of Energy Efficiency Metrics of the AI Lifecycle in 6G and Beyond},
  year={2024},
  volume={},
  number={},
  pages={187-190},
  keywords={Measurement;6G mobile communication;Energy consumption;Costs;Energy measurement;Energy efficiency;Computational efficiency;Quality of experience;Artificial intelligence;Standards;6G;AI-native network;energy efficiency},
  doi={10.1109/CSCN63874.2024.10849732}}

License

BSD 3-Clause License. See LICENSE.

Metadata

Release files for ecal-energy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecal-energy 0.1.0
File Size Uploaded Provenance Actions
ecal_energy-0.1.0.tar.gz 26.9 kB With provenance Details for ecal_energy-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ecal-energy 0.1.0
File Interpreter ABI Platform Actions
ecal_energy-0.1.0-py3-none-any.whl Python 3 none any Details for ecal_energy-0.1.0-py3-none-any.whl

Total release size: 52.2 kB

Release files / ecal_energy-0.1.0.tar.gz

Download URL ecal_energy-0.1.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b3596ba324710935093c2d092f57ef3be2464a742ea746f626fba654ae86397f
BLAKE2b-256 checksum
How to use checksums
cda475f0765a754f4e48a9f7b9d8e1a12d93631862c8318865cc057713cdbecd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / ecal_energy-0.1.0-py3-none-any.whl

Download URL ecal_energy-0.1.0-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f2a544bf3bcbfaf8b8f8fc0ca6fd7bb8f5f7c119ae889600effb058bbc2250f
BLAKE2b-256 checksum
How to use checksums
77c971e092e263a748df345546521627c1f73ea35810f1efddce0ff2e48b18fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Security for ecal-energy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ecal_energy-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page