EPiCarbon is a Python-based tool for estimating the carbon footprint of electro-photonic systems. It calculates the Embodied Carbon Footprint (ECF), Operational Carbon Footprint (OCF), and the Carbon Footprint (CF) of a system based on its architecture and energy usage.
-
Ensure you have Python 3.8 or higher installed. You can check your Python version with:
python --version
-
Clone the repository:
git clone https://github.com/bu-icsg/EPiCarbon.git cd EPiCarbon -
Install the required dependencies:
pip install --upgrade pip # Optional pip install -r requirements.txt
epicarbon.py: Main script for running the program.src/: Contains chiplet models, data files, and utility functions.archs/: Contains example architecture description files in JSON format.
Run the program using the command line:
python epicarbon.py --estimate <metric> [--arch <arch_file>] [--energy <energy_per_inf>] [--verbose]--estimate: Select the metric to estimate. Options:ECF: Embodied Carbon Footprint.OCF: Operational Carbon Footprint.CF: Carbon Footprint.
--arch: Path to the architecture description file in JSON (required forECFandCF)--energy: Energy per inference in joules (required forOCFandCF).--verbose: Enable detailed logging.
-
Calculate ECF:
python epicarbon.py --estimate ECF --arch archs/adept.json --verbose
Alternatively, call the
get_carbon_embodied()API by importingepicarbonfrom another script. -
Calculate OCF:
python epicarbon.py --estimate OCF --energy 1e-3 --verbose
Alternatively, call the
get_carbon_operational()API by importingepicarbonfrom another script. -
Calculate CF:
python epicarbon.py --estimate CF --arch archs/adept.json --energy 1e-3 --verbose
Alternatively, call the
get_carbon_footprint()API by importingepicarbonfrom another script.
Architecture files describe the system's chiplets and packaging. Example files are located in the archs/ directory, such as:
archs/lt.jsonarchs/adept.json
An architecture file contains the following fields:
chiplets: A list of chiplets in the system. Each chiplet includes:type: The type of the chiplet (Options:cmos-logicorpic-logic).tech: The technology node of the chiplet in nanometers (Options: forpic-logicuse-1, forcmos-logicchoose among28,20,14,10,8,7,5, or3nm).area: The area of the chiplet in square centimeters.num_chiplets: The number of identical chiplets of this type.
package: The packaging type of the system (Options:monolithic,3D,2.5D-active,2.5D-passive).
Below is an example architecture file for a system named "ADEPT":
{
"chiplets": [
{
"type": "cmos-logic",
"tech": 20,
"area": 6.51,
"num_chiplets": 1
},
{
"type": "pic-logic",
"tech": -1,
"area": 0.56,
"num_chiplets": 4
}
],
"package": "3D"
}Several default parameters are defined in the program that can be changed in code (epicarbon.py):
- Fabrication (ci_fab): 820 gCO2/kWh (coal-based electricity).
- Operation (ci_op): 11 gCO2/kWh (wind-based electricity).
- Number of inferences per day (num_inf_per_day): 1e9.
- Lifetime (lifetime_days): 5*365 days.
EPiCarbon can be easily extended to support a custom chiplet.
- Simply add your new chiplet inside
src/chiplet_modelsfolder by inheriting theChipletclass. You can follow the example ofcmos_logic_chipletorpic_logic_chiplet. - Implement the
get_manufacturing_carbon()method of your new chiplet. - Update the
build_chiplet()method insrc/utils.pyto handle your create your new chiplet while parsing the architecture file.
- Fayza F, Demirkiran C, Papa Rao S, Bunandar D, Gupta U, Joshi A. EPiCarbon: A Carbon Modeling Tool for Electro-Photonic Accelerators. ICCAD 2025 (https://bu-icsg.github.io/publications/2025/Fayza_ICCAD_2025.pdf)
- Fayza F, Demirkiran C, Papa Rao S, Bunandar D, Gupta U, Joshi A. Photonics for sustainable AI. Communications Physics. 2025 Oct 14;8(1):403. (https://www.nature.com/articles/s42005-025-02300-0)
For questions or feedback, please contact [[email protected]].