Skip to content

0. Getting Started

Pedro Gimenes edited this page Apr 4, 2024 · 7 revisions

Getting Started - MSc Projects

Follow these instructions if you are an Imperial College student working on AGILE as part of your MSc or MEng project.

  1. Start by cloning the repository, and check out your specified branch.
git clone https://github.com/pgimenes/ample.git
git checkout <BRANCH/NAME>
  1. Add the contents of utilities.sh to your bashrc and source it. The here command now defines the current directory as your working area for all AMPLE scripts.
cd ample
cat scripts/utilities.sh >> ~/.bashrc
source ~/.bashrc
here
  1. In a new terminal, setup the required Vivado version (2019.2).
setup_vivado 23.1
  1. If you don't have conda installed yet, download the installation file for your platform from the link and execute with all default settings. For example:
wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
chmod +x Anaconda3-2023.09-0-Linux-x86_64.sh
./Anaconda3-2023.09-0-Linux-x86_64.sh -b
  1. Create a conda environment from the defined yaml file and install pip dependencies.
conda env create -f environment.yml
conda activate agile
pip install -r $WORKAREA/requirements.txt

Note: a common error is that conda does not update the path to use the environment version of python and pip. Check this by running which pip and ensuring this points to a path within your anaconda installation.

  1. Run the build script to update submodules, build register banks and the Vivado build project.
source $WORKAREA/scripts/build.sh
  1. Generate the simulation payloads. For example, for a one-layer GCN model on the Cora dataset:
$WORKAREA/scripts/initialize.py --gcn --cora --layers 1 --in_features 64 --out_features 64 --random --payloads
  1. Build the testbench.
cd $WORKAREA/hw/sim
make build
  1. Run the simulation.
make run_sim GUI=1

Clone this wiki locally