pythia_g1
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Stephen-Wei
- License: mit
- Language: C++
- Default Branch: main
- Size: 3.57 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
Context-Aware Dynamically Weighted Prefetcher
Table of Contents
What is the Context-Aware Dynamically Weighted Prefetcher?
Pythia is a hardware-realizable, light-weight data prefetcher that uses reinforcement learning to generate accurate, timely, and system-aware prefetch requests. In modern computing systems, the widening gap between processor speed and memory access latency creates a critical performance bottleneck, with hardware prefetching emerging as an essential technique to hide memory latency. While recent machine learning-based prefetchers like Pythia have shown promise by leveraging reinforcement learning (RL), they often struggle with dynamic workloads exhibiting irregular access patterns or phase transitions. Context-Aware Dynamically Weighted Prefetcher addresses these challenges, Our design introduces a two-level error tracking mechanism to detect execution phase changes and employs context vector matching to dynamically switch between stored weight sets, enabling rapid adaptation without retraining from scratch.
Prerequisites
The infrastructure has been tested with the following system configuration: * G++ v6.3.0 20170516 * CMake v3.20.2 * md5sum v8.26 * Perl v5.24.1
Installation
- Install necessary prequisites
bash sudo apt install perl - Clone the GitHub repo
bash
git clone https://github.com/CMU-SAFARI/Pythia.git
2. Clone the bloomfilter library inside Pythia home directory
bash
cd Pythia
git clone https://github.com/mavam/libbf.git libbf
3. Build bloomfilter library. This should create the static libbf.a library inside build directory
```bash
cd libbf
mkdir build && cd build
cmake ../
make clean && make
```
- Build Pythia for single/multi core using build script. This should create the executable inside
bindirectory.
bash
cd $PYTHIA_HOME
# ./build_champsim.sh <l1_pref> <l2_pref> <llc_pref> <ncores>
./build_champsim.sh multi multi no 1
Please use build_champsim_highcore.sh to build ChampSim for more than four cores.
Set appropriate environment variables as follows:
bash source setvars.sh
Preparing the Traces
[Update: Dec 18, 2024] The trace will be downloaded in two phases: (1) all traces, except Ligra and PARSEC workloads, will be downloaded using the automated script, and (2) the Ligra and PARSEC traces needs to be downloaded manually from Zenodo repository mentioned below.
Use the
download_traces.plperl script to download all traces, except Ligra and PARSEC.bash mkdir $PYTHIA_HOME/traces/ cd $PYTHIA_HOME/scripts/ perl download_traces.pl --csv artifact_traces.csv --dir ../traces/Note: The script should download 138 traces. Please check the final log for any incomplete downloads.
Once the trace download completes, please verify the checksum as follows. Please make sure all traces pass the checksum test.
bash cd $PYTHIA_HOME/traces md5sum -c ../scripts/artifact_traces.md5Download the Ligra and PARSEC traces from these repositories:
- Ligra: https://doi.org/10.5281/zenodo.14267977
- PARSEC 2.1: https://doi.org/10.5281/zenodo.14268118
If the traces are downloaded in some other path, please change the full path in
experiments/MICRO21_1C.tlistandexperiments/MICRO21_4C.tlistaccordingly.
Traces for this project
- 605.mcf_s-472B.champsimtrace.xz
- 607.cactuBSSN_s-2421B.champsimtrace.xz
- 619.lbm_s-2677B.champsimtrace.xz
- 620.omnetpp_s-141B.champsimtrace.xz
- 621.wrf_s-6673B.champsimtrace.xz
- 623.xalancbmk_s-10B.champsimtrace.xz
- 628.pop2_s-17B.champsimtrace.xz
- 649.fotonik3d_s-10881B.champsimtrace.xz
- 654.roms_s-1007B.champsimtrace.xz
- cassandraphase0core0.trace.xz
- cloud9phase5core2.trace.xz
- nutchphase0core0.trace.xz
- streamingphase0core1.trace.xz
Experimental Workflow
Our experimental workflow consists of two stages: (1) launching experiments, and (2) rolling up statistics from experiment outputs.
Launching Experiments
- To create necessary experiment commands in bulk, we will use
scripts/create_jobfile.pl create_jobfile.plrequires three necessary arguments:exe: the full path of the executable to runtlist: contains trace definitionsexp: contains knobs of the experiements to run
Create experiments as follows. Please make sure the paths used in tlist and exp files are appropriate.
bash cd $PYTHIA_HOME/experiments/ export PYTHIA_HOME=/home/Pythia perl -I../scripts ../scripts/create_jobfile.pl \ --exe $PYTHIA_HOME/bin/perceptron-multi-multi-no-ship-1core \ --tlist my_traces.tlist \ --exp MICRO21_1C_2.exp \ --local 1 \ > jobfile.shGo to a run directory (or create one) inside
experiementsto launch runs in the following way:bash cd experiments_1C export PYTHIA_HOME=/home/Pythia source ../jobfile.shIf you have slurm support to launch multiple jobs in a compute cluster, please provide
--local 0tocreate_jobfile.pl
Rolling-up Statistics
- To rollup stats in bulk, we will use
scripts/rollup.pl rollup.plrequires three necessary arguments:tlistexpmfile: specifies stat names and reduction method to rollup
Rollup statistics as follows. Please make sure the paths used in tlist and exp files are appropriate.
```bash export PYTHIAHOME=/home/Pythia perl ../../scripts/rollup.pl --tlist ../mytraces.tlist --exp ../MICRO211C2.exp --mfile ../rollup1Cbase_config.mfile > rollup.csv
```
Export the
rollup.csvfile in you favourite data processor (Python Pandas, Excel, Numbers, etc.) to gain insights.
HDL Implementation
We also implement Pythia in Chisel HDL to faithfully measure the area and power cost. The implementation, along with the reports from umcL65 library, can be found the following GitHub repo. Please note that the area and power projections in the sample report is different than what is reported in the paper due to different technology.
Code Walkthrough
Pythia was code-named Scooby (the mistery-solving dog) during the developement. So any mention of Scooby anywhere in the code inadvertently means Pythia.
- The top-level files for Pythia are
prefetchers/scooby.ccandinc/scooby.h. These two files declare and define the high-level functions for Pythia (e.g.,invoke_prefetcher,register_fill, etc.). - The released version of Pythia has two types of RL engine defined: basic and featurewise. They differ only in terms of the QVStore organization (please refer to our paper to know more about QVStore). The QVStore for basic version is simply defined as a two-dimensional table, whereas the featurewise version defines it as a hierarchichal organization of multiple small tables. The implementation of respective engines can be found in
src/andinc/directories. inc/feature_knowledge.handsrc/feature_knowldege.ccdefine how to compute each program feature from the raw attributes of a deamand request. If you want to define your own feature, extend the enumFeatureTypeininc/feature_knowledge.hand define its correspondingprocessfunction.inc/util.handsrc/util.cccontain all hashing functions used in our evaluation. Play around with them, as a better hash function can also provide performance benefits.
Our Citation
We finished this project mainly base on this paper
@inproceedings{bera2021,
author = {Bera, Rahul and Kanellopoulos, Konstantinos and Nori, Anant V. and Shahroodi, Taha and Subramoney, Sreenivas and Mutlu, Onur},
title = {{Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement Learning}},
booktitle = {Proceedings of the 54th Annual IEEE/ACM International Symposium on Microarchitecture},
year = {2021}
}
Also based on the code work of the pythia authors
https://github.com/CMU-SAFARI/Pythia
Owner
- Name: John
- Login: Stephen-Wei
- Kind: user
- Location: Shenzhen
- Repositories: 1
- Profile: https://github.com/Stephen-Wei
hello world~~~~
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use our framework to evaluate Pythia, please cite the work as follows."
authors:
- family-names: "Bera"
given-names: "Rahul"
- family-names: "Kanellopoulos"
given-names: "Konstantinos"
title: "Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement Learning"
version: 1.3
doi: 10.5281/zenodo.5520125
date-released: 2021-09-22
url: "https://github.com/CMU-SAFARI/Pythia"
preferred-citation:
title: "Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement Learning"
type: proceedings
year: 2021
conference:
name: "54th International Symposium on Microarchitecture(MICRO)"
authors:
- family-names: "Bera"
given-names: "Rahul"
- family-names: "Kanellopoulos"
given-names: "Konstantinos"
- family-names: "Nori"
given-names: "Anant V."
- family-names: "Shahroodi"
given-names: "Taha"
- family-names: "Subramoney"
given-names: "Sreenivas"
- family-names: "Mutlu"
given-names: "Onur"
doi: "10.1145/3466752.3480114"
GitHub Events
Total
- Watch event: 1
- Issue comment event: 1
- Member event: 2
- Push event: 17
- Pull request event: 14
- Fork event: 2
- Create event: 3
Last Year
- Watch event: 1
- Issue comment event: 1
- Member event: 2
- Push event: 17
- Pull request event: 14
- Fork event: 2
- Create event: 3