Skip to content

Commit 7bbaae9

Browse files
Accelergy v0.4 & v0.4 plug-in suite
1 parent 28bb83a commit 7bbaae9

11 files changed

+83
-58
lines changed

.gitmodules

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,22 @@
1313
[submodule "src/cacti"]
1414
path = src/cacti
1515
url = https://github.com/HewlettPackard/cacti.git
16-
[submodule "src/src/timeloop"]
17-
path = src/src/timeloop
18-
url = https://github.com/NVlabs/timeloop.git
1916
[submodule "src/timeloop"]
2017
path = src/timeloop
2118
url = https://github.com/NVlabs/timeloop.git
2219
[submodule "src/timeloop-python"]
2320
path = src/timeloop-python
2421
url = https://github.com/Accelergy-Project/timeloop-python.git
22+
branch = main
23+
[submodule "src/accelergy-library-plug-in"]
24+
path = src/accelergy-library-plug-in
25+
url = https://github.com/Accelergy-Project/accelergy-library-plug-in.git
26+
branch = main
27+
[submodule "src/accelergy-neurosim-plug-in"]
28+
path = src/accelergy-neurosim-plug-in
29+
url = https://github.com/Accelergy-Project/accelergy-neurosim-plug-in.git
30+
branch = main
31+
[submodule "src/accelergy-adc-plug-in"]
32+
path = src/accelergy-adc-plug-in
33+
url = https://github.com/Accelergy-Project/accelergy-adc-plug-in.git
34+
branch = main

Dockerfile

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ RUN apt-get update \
2929
&& make \
3030
&& chmod -R 777 .
3131

32+
33+
# NeuroSim
34+
35+
WORKDIR $BUILD_DIR
36+
COPY src/accelergy-neurosim-plug-in $BUILD_DIR/accelergy-neurosim-plug-in
37+
RUN cd accelergy-neurosim-plug-in \
38+
&& mkdir NeuroSim \
39+
&& cp -r DNN_NeuroSim_V1.3/Inference_pytorch/NeuroSIM/* ./NeuroSim/ \
40+
&& cp -rf drop_in/* ./NeuroSim/ \
41+
&& cd NeuroSim \
42+
&& make \
43+
&& chmod -R 777 .
44+
45+
3246
# Build and install timeloop
3347

3448
WORKDIR $BUILD_DIR
@@ -50,8 +64,8 @@ RUN apt-get update \
5064
&& cd ./timeloop/src \
5165
&& ln -s ../pat-public/src/pat . \
5266
&& cd .. \
53-
&& scons --accelergy \
54-
&& scons --static --accelergy \
67+
&& scons --accelergy -j 16 \
68+
&& scons --static --accelergy -j 16 \
5569
&& cp build/timeloop-mapper /usr/local/bin \
5670
&& cp build/timeloop-metrics /usr/local/bin \
5771
&& cp build/timeloop-model /usr/local/bin
@@ -93,25 +107,25 @@ ENV INCLUDE_DIR=/usr/local/include
93107

94108
RUN apt-get update \
95109
&& apt-get install -y --no-install-recommends \
96-
curl \
97-
git \
98-
wget \
99-
vim \
110+
curl \
111+
git \
112+
wget \
113+
vim \
100114
&& apt-get install -y --no-install-recommends python3-dev \
101115
&& apt-get install -y --no-install-recommends python3-pip \
102116
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata \
103117
&& apt-get install -y --no-install-recommends \
104-
g++ \
105-
libconfig++-dev \
106-
libboost-dev \
107-
libboost-iostreams-dev \
108-
libboost-serialization-dev \
109-
libyaml-cpp-dev \
110-
libncurses5-dev \
111-
libtinfo-dev \
112-
libgpm-dev \
113-
cmake \
114-
ninja-build \
118+
g++ \
119+
libconfig++-dev \
120+
libboost-dev \
121+
libboost-iostreams-dev \
122+
libboost-serialization-dev \
123+
libyaml-cpp-dev \
124+
libncurses5-dev \
125+
libtinfo-dev \
126+
libgpm-dev \
127+
cmake \
128+
ninja-build \
115129
&& rm -rf /var/lib/apt/lists/* \
116130
&& groupadd workspace \
117131
&& useradd -m -d /home/workspace -c "Workspace User Account" -s /usr/sbin/nologin -g workspace workspace \
@@ -161,23 +175,26 @@ WORKDIR $BUILD_DIR
161175
# Note source for accelergy was copied in above
162176

163177
COPY --from=builder $BUILD_DIR/cacti $SHARE_DIR/accelergy/estimation_plug_ins/accelergy-cacti-plug-in/cacti
178+
RUN mkdir $BUILD_DIR/accelergy-neurosim-plug-in/NeuroSim
179+
COPY --from=builder $BUILD_DIR/accelergy-neurosim-plug-in/NeuroSim/main $BUILD_DIR/accelergy-neurosim-plug-in/NeuroSim/main
180+
181+
WORKDIR $BUILD_DIR
182+
183+
# accelergy-neurosim-main $BUILD_DIR/accelergy-neurosim-main
164184

165185
RUN python3 -m pip install setuptools \
166186
&& python3 -m pip install wheel \
167187
&& python3 -m pip install libconf \
168188
&& python3 -m pip install numpy \
169-
&& cd accelergy \
170-
&& python3 -m pip install . \
171-
&& cd .. \
172-
&& cd accelergy-aladdin-plug-in \
173-
&& python3 -m pip install . \
174-
&& cd .. \
175-
&& cd accelergy-cacti-plug-in \
176-
&& python3 -m pip install . \
177-
&& chmod 777 $SHARE_DIR/accelergy/estimation_plug_ins/accelergy-cacti-plug-in/cacti \
178-
&& cd .. \
179-
&& cd accelergy-table-based-plug-ins \
180-
&& python3 -m pip install .
189+
&& python3 -m pip install ./accelergy \
190+
&& python3 -m pip install ./accelergy-aladdin-plug-in \
191+
&& python3 -m pip install ./accelergy-cacti-plug-in \
192+
&& python3 -m pip install ./accelergy-table-based-plug-ins \
193+
&& python3 -m pip install ./accelergy-neurosim-plug-in \
194+
&& python3 -m pip install ./accelergy-library-plug-in \
195+
&& python3 -m pip install ./accelergy-adc-plug-in \
196+
&& chmod -R 777 $SHARE_DIR/accelergy/estimation_plug_ins
197+
181198

182199
# PyTimeloop
183200

@@ -196,9 +213,6 @@ RUN apt-get update \
196213
TIMELOOP_LIB_PATH=$LIB_DIR \
197214
python3 -m pip install .
198215

199-
# Ruamel yaml
200-
RUN pip3 install ruamel.yaml
201-
202216

203217
# Set up entrypoint
204218

README-WSL.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,22 @@ Build procedure
2020

2121
```
2222
git clone --recurse-submodules https://github.com/Accelergy-Project/accelergy-timeloop-infrastructure.git
23-
24-
cd src/cacti
25-
make
26-
27-
cd ../accelergy
28-
pip3 install .
29-
cd ../accelergy-aladdin-plug-in/
30-
pip3 install .
31-
cd ../accelergy-cacti-plug-in/
32-
pip3 install .
33-
cp -r ../cacti ~/.local/share/accelergy/estimation_plug_ins/accelergy-cacti-plug-in/
34-
cd ../accelergy-table-based-plug-in/
35-
pip3 install .
36-
37-
cd ../timeloop
38-
cd src/
39-
ln -s ../pat-public/src/pat .
40-
scons --accelergy --static
23+
cd accelergy-timeloop-infrastructure
24+
25+
cd src/cacti ; make ; cd ..
26+
cd accelergy-neurosim-plug-in ; make ; cd ..
27+
pip3 install ./accelergy
28+
pip3 install ./accelergy-aladdin-plug-in
29+
pip3 install ./accelergy-cacti-plug-in
30+
pip3 install ./accelergy-table-based-plug-ins
31+
pip3 install ./accelergy-neurosim-plug-in
32+
pip3 install ./accelergy-library-plug-in
33+
pip3 install ./accelergy-adc-plug-in
34+
cp -r ./cacti ~/.local/share/accelergy/estimation_plug_ins/accelergy-cacti-plug-in/
35+
36+
cd timeloop
37+
ln -s "$(pwd)/pat-public/src/pat" ./src
38+
scons --accelergy --static -j 16
4139
cp build/timeloop-* ~/.local/bin
4240
```
4341

src/accelergy

Submodule accelergy updated 65 files

src/accelergy-adc-plug-in

Submodule accelergy-adc-plug-in added at d09fcc0

src/accelergy-cacti-plug-in

src/accelergy-library-plug-in

src/accelergy-neurosim-plug-in

0 commit comments

Comments
 (0)