Code Monkey home page Code Monkey logo

dirtystuff's People

Contributors

lingrui98 avatar maxkev1n avatar shinezyy avatar sktt1ryze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dirtystuff's Issues

Emu cache dumper/restorer

rm -rf build/trace && mkdir -p build/trace
source build/replayer.sh
./build/emu <args>

The generated hex files are located under ./build/trace.

  • To restore, make sure hex files are located under ./build/trace:
./build/emu <args> -- +LOAD_SRAM

Distributed gem5 checkpoint runner

Doc WIP.

  • 4 servers, s{1-4}, 32 core, 128G ram
  • /home mounted as nfs and shared across servers
  • build in local podman container
  • parallel is GNU Parallel
branch=dep-check && \
podman exec --workdir /ff-reshape 02 git fetch --all && \
podman exec --workdir /ff-reshape 02 git checkout $branch -f && \
podman exec --workdir /ff-reshape 02 git pull -f && \
gitid=$(podman exec --workdir /ff-reshape 02 git describe --always --dirty) && \
podman exec --workdir /ff-reshape 02 sed -i -e '/opt/ s/-g//' src/SConscript && \
podman exec --workdir /ff-reshape 02 scons build/RISCV/gem5.opt -j22 && \
rm -rf gem5.opt configs && \
ssh s1 "rm -rf rm -rf /home/yqszxx/gem5.opt /home/yqszxx/configs" && \
podman cp 02:/ff-reshape/build/RISCV/gem5.opt . && \
scp gem5.opt s1:/home/yqszxx/gem5.opt && \
podman cp 02:/ff-reshape/configs . && \
find configs -name \*.pyc -delete && \
scp -r configs s1:/home/yqszxx/configs && \
starttime=$(date +%y%m%d-%H%M%S) && \
parallel -S 28/s1,28/s2,28/s3,28/s4 -a /home/yqszxx/checkpoints/chkpt50.list \
/home/yqszxx/gem5.opt \
--outdir /home/yqszxx/result/$gitid-$starttime/{} \
/home/yqszxx/configs/example/fs.py \
--cpu-type NonCachingSimpleCPU \
--mem-size=8GB \
--maxinsts 50000000 \
--gcpt-restorer /home/yqszxx/gcpt-restorer \
--generic-rv-cpt /home/yqszxx/checkpoints/{}/0/*.gz \
--depcheck

For spce17:

branch=dep-check && \
podman exec --workdir /ff-reshape 02 git fetch --all && \
podman exec --workdir /ff-reshape 02 git checkout $branch -f && \
podman exec --workdir /ff-reshape 02 git pull -f && \
gitid=$(podman exec --workdir /ff-reshape 02 git describe --always --dirty) && \
podman exec --workdir /ff-reshape 02 sed -i -e '/opt/ s/-g//' src/SConscript && \
podman exec --workdir /ff-reshape 02 scons build/RISCV/gem5.opt -j22 && \
rm -rf gem5.opt configs && \
ssh s2 "rm -rf rm -rf /home/yqszxx/gem5.opt /home/yqszxx/configs" && \
podman cp 02:/ff-reshape/build/RISCV/gem5.opt . && \
scp gem5.opt s2:/home/yqszxx/gem5.opt && \
podman cp 02:/ff-reshape/configs . && \
find configs -name \*.pyc -delete && \
scp -r configs s2:/home/yqszxx/configs && \
starttime=$(date +%y%m%d-%H%M%S) && \
parallel -S 28/s2,28/s3,28/s4 -a /home/yqszxx/checkpoints17/chkpt50.list \
/home/yqszxx/gem5.opt \
--outdir /home/yqszxx/result17/$gitid-$starttime/{} \
/home/yqszxx/configs/example/fs.py \
--cpu-type NonCachingSimpleCPU \
--mem-size=8GB \
--maxinsts 20000000 \
--gcpt-restorer /home/yqszxx/gcpt-restorer \
--generic-rv-cpt /home/yqszxx/checkpoints17/{}/0/*.gz \
--depcheck

Result process:

for f in */*.txt; do
testcase=$(echo $f | cut -d/ -f1);
dep=$(grep dependent $f | sed -E 's/\s+/,/g' | cut -d, -f2);
inter=$(grep interGroup $f | sed -E 's/\s+/,/g' | cut -d, -f2);
intra=$(grep intraGroup $f | sed -E 's/\s+/,/g' | cut -d, -f2);
echo $testcase,$dep,$inter,$intra >> summary.csv;
done

Filter out checkpoints that intra-rate < 0.8, and print total weighted intra-rate >= 0.8 rate:

cat summary.csv | sed -E 's/(.*)_(.*)/\1,\2/' |
awk -F, '{print $0 "," $5/$3}' |
sort -t, -k6 -r |
awk -F, 'BEGIN{print "< 0.8: chkpt weight intra-rate"} {total+=$2; if ($6 >= 0.8) meet+= $2; else print $1,$2,$6;} END{print "weighted (>=0.8)/total = " meet/total}'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.