Skip to content

Commit

Permalink
Release v0.7.0 (#259)
Browse files Browse the repository at this point in the history
* Add support for I-BERT, including its I-GELU, layernorm, and softmax variants
* Add new parallelized profiling and data collection scripts
* Support for Chipyard 1.8
* Miscellaneous area, power, perf, and functionality improvements, as well as bug fixes
  • Loading branch information
hngenc authored Nov 28, 2022
1 parent a4be769 commit aaedc95
Show file tree
Hide file tree
Showing 56 changed files with 1,632 additions and 513 deletions.
35 changes: 0 additions & 35 deletions .github/scripts/build-toolchains.sh

This file was deleted.

2 changes: 2 additions & 0 deletions .github/scripts/defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ LOCAL_ESP_DIR=$HOME/esp-tools-install
LOCAL_CHIPYARD_DIR=$HOME/chipyard
LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator
LOCAL_VERILATOR_DIR=$HOME/verilator-install
LOCAL_CONDA=/opt/conda/

echo "::set-output name=LOCAL_WORK_DIR::$LOCAL_WORK_DIR"
echo "::set-output name=LOCAL_CHECKOUT_DIR::$LOCAL_CHECKOUT_DIR"
Expand All @@ -36,3 +37,4 @@ echo "::set-output name=LOCAL_ESP_DIR::$LOCAL_ESP_DIR"
echo "::set-output name=LOCAL_CHIPYARD_DIR::$LOCAL_CHIPYARD_DIR"
echo "::set-output name=LOCAL_SIM_DIR::$LOCAL_SIM_DIR"
echo "::set-output name=LOCAL_VERILATOR_DIR::$LOCAL_VERILATOR_DIR"
echo "::set-output name=LOCAL_CONDA::$LOCAL_CONDA"
18 changes: 5 additions & 13 deletions .github/scripts/do-rtl-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ set -ex
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh

rm -rf $LOCAL_CHIPYARD_DIR/generators/gemmini/*
cd $LOCAL_CHECKOUT_DIR
git submodule update --init --recursive software/gemmini-rocc-tests
mv -f $LOCAL_CHECKOUT_DIR/* $LOCAL_CHIPYARD_DIR/generators/gemmini/
source $SCRIPT_DIR/enable-conda.sh

cd $LOCAL_CHIPYARD_DIR
source env.sh

TOOLS_DIR=$LOCAL_ESP_DIR
LD_LIB_DIR=$LOCAL_ESP_DIR/lib

# enter the verilator directory and build the specific config on remote server
cd $LOCAL_SIM_DIR
make -C $LOCAL_SIM_DIR clean
export RISCV=$TOOLS_DIR
export LD_LIBRARY_PATH=$LD_LIB_DIR
export PATH=$LOCAL_VERILATOR_DIR/bin:$PATH
export VERILATOR_ROOT=$LOCAL_VERILATOR_DIR
export COURSIER_CACHE=$LOCAL_WORK_DIR/.coursier-cache
make -j$LOCAL_MAKE_NPROC -C $LOCAL_SIM_DIR VERILATOR_OPT_FLAGS="-O0 -OG" JAVA_OPTS="-Xmx2500M -Xss8M" SBT_OPTS="-Dsbt.ivy.home=$LOCAL_CHIPYARD_DIR/.ivy2 -Dsbt.supershell=false -Dsbt.global.base=$LOCAL_CHIPYARD_DIR/.sbt -Dsbt.boot.directory=$LOCAL_CHIPYARD_DIR/.sbt/boot" CONFIG=GemminiRocketConfig

13 changes: 13 additions & 0 deletions .github/scripts/enable-conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

export PATH="$LOCAL_CONDA/bin:$PATH"
conda init
source ~/.bashrc
conda activate base
if ! { conda env list | grep 'chipyard'; } >/dev/null 2>&1; then
conda create -n chipyard
conda activate chipyard
conda install -c conda-forge conda-lock
fi
conda activate chipyard

40 changes: 40 additions & 0 deletions .github/scripts/install-gemmini.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

#-------------------------------------------------------------
# installs gemmini
#
# run location: circle ci docker image
#-------------------------------------------------------------

# turn echo on and error on earliest command
set -ex

# get shared variables
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh

source $SCRIPT_DIR/enable-conda.sh

cd $HOME
rm -rf chipyard
git clone --progress --verbose https://github.com/ucb-bar/chipyard.git chipyard
cd $LOCAL_CHIPYARD_DIR

git fetch
git checkout $(cat $LOCAL_CHECKOUT_DIR/CHIPYARD.hash)

./build-setup.sh esp-tools

source env.sh

cd toolchains/esp-tools/riscv-isa-sim/build
git checkout $(cat $LOCAL_CHECKOUT_DIR/SPIKE.hash)
make && make install

cd $LOCAL_CHECKOUT_DIR
chown -R $(whoami) .
git config --global --add safe.directory $LOCAL_CHECKOUT_DIR
git submodule update --init --recursive software/gemmini-rocc-tests
rm -rf $LOCAL_CHIPYARD_DIR/generators/gemmini/* $LOCAL_CHIPYARD_DIR/generators/gemmini/.git*
mv -f $LOCAL_CHECKOUT_DIR/* $LOCAL_CHECKOUT_DIR/.git* $LOCAL_CHIPYARD_DIR/generators/gemmini/

20 changes: 0 additions & 20 deletions .github/scripts/install-verilator.sh

This file was deleted.

23 changes: 0 additions & 23 deletions .github/scripts/prepare-for-rtl-build.sh

This file was deleted.

10 changes: 10 additions & 0 deletions .github/scripts/remove-chipyard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -ex

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh

rm -rf $LOCAL_CHIPYARD_DIR
rm -rf $LOCAL_CONDA

6 changes: 3 additions & 3 deletions .github/scripts/run-tests-rtl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ set -ex
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh

source $SCRIPT_DIR/enable-conda.sh

TOOLS_DIR=$LOCAL_ESP_DIR
PATH=$PATH:$LOCAL_ESP_DIR/bin
cd $LOCAL_CHIPYARD_DIR
source env.sh

cd $LOCAL_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests
CFLAGS=-DFAST ./build.sh

cd build
make test-baremetal-bareMetalC RUNNER="'make -C $LOCAL_CHIPYARD_DIR/sims/verilator/ CONFIG=GemminiRocketConfig run-binary-hex BINARY='"


17 changes: 4 additions & 13 deletions .github/scripts/run-tests-spike.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,14 @@ set -ex
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh

source $SCRIPT_DIR/enable-conda.sh

# clone and build our version of spike
TOOLS_DIR=$LOCAL_ESP_DIR
PATH=$PATH:$LOCAL_ESP_DIR/bin

git clone https://github.com/ucb-bar/esp-isa-sim.git
cd esp-isa-sim
git checkout $(cat $LOCAL_CHECKOUT_DIR/SPIKE.hash)
cp $LOCAL_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests/include/gemmini_params.h gemmini/

mkdir build
cd build
../configure --prefix=$TOOLS_DIR
make -j8 install
cd $LOCAL_CHIPYARD_DIR
source env.sh

cd $LOCAL_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests
./build.sh

cd build
make test-baremetal

Loading

0 comments on commit aaedc95

Please sign in to comment.