# Partitioning FPGA-Optimized Systolic Arrays We provide a fast optimization algorithm and a step-to-step guide on how to generate the dataset for a specific board and topologies to be used by our optimization tool. > *Long Chung Chan, Gurshaant Singh Malik and Nachiket Kapre* > [**"Partitioning FPGA-Optimized Systolic Arrays for Fun and Profit"**](https://git.uwaterloo.ca/watcag-public/fpga-syspart/blob/master/optimization_algo/paper/PID6211513.pdf), > 2019 International Conference on Field-Programmable Technology ### TODO - [x] Add a public link to the paper - [x] Basic Demo Flow - [] Step-by-step guide on - [] their own data set - [] running the optimzation algo on the generated dataset - [] What each files/directories are responsible for - [] Changes done to ScaleSim - [] Explanation of the testing result ### Demos The following demos use pre-generated datasets and topologies that can be found in: - [topologies](https://git.uwaterloo.ca/watcag-public/fpga-syspart/blob/master/optimization_algo/topologies/) contains all the topologies descriping their respective CNN structures - [data_source](https://git.uwaterloo.ca/watcag-public/fpga-syspart/blob/master/optimization_algo/data_source/) contains all the cycle-accurate data generated using [SCALE sim](https://github.com/ARM-software/SCALE-Sim) The instruction below will do a sweep run on each of the following networks: - FasterRCNN - Mobilenet - Yolo tiny - Googlenet - Alexnet - AlphaGoZero - NCF_rec - Resnet_50_v1 To obtain individual optimization result for a specific network and a specfic number of partition, please refer to the section below. To get optimization result with 1. Covariance Matrix Adaptation Evolution Strategy (CMA-es) ```bash # cd optimization_algo/scripts # ./sweep_nets_cma.sh ``` 2. Genetic Algorithm (GA) ```bash # cd optimization_algo/scripts # ./sweep_nets_ga.sh ``` 3. Hyperparameter Optimiztion ```bash # cd optimization_algo/scripts # ./sweep_nets_ho.sh ``` 4. Brute Force ```bash # cd optimization_algo/scripts # ./sweep_nets_brute.sh ``` Result of the optimization will be added to the corresponding csv file under this [folder](https://git.uwaterloo.ca/watcag-public/fpga-syspart/blob/master/optimization_algo/resulting_csv) ### Step-by-step detail guide #### Custom topologies #### Custom target board ### Repo breakdown ### Changes made to Scale-sim ### Interpretation to the test result ## License This tool is distributed under MIT license. Copyright (c) 2019 Long Chung Chan, Gurshaant Singh Malik, Nachiket Kapre
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.