Skip to content

Commit

Permalink
README added
Browse files Browse the repository at this point in the history
  • Loading branch information
krishagrawal112 committed Aug 21, 2023
1 parent d481bea commit 40701a0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## relu_main.py
The relu_main script is used to run and log sparsity collection and optimiser for different relu tuning policies

### Notes
Assumes the existence of a the following directories:
- ./runlog
- ./runlog/<arch-name<
- ./relu_thresholds
- ./relu_thresholds/<arch-name<
- ./relu_thresholds
- ./relu_thresholds/<arch-name<
- ../../fpgaconvnet-optimiser/fpgaconvnet/optimiser/<arch-name<

Uses the krish-skipping branches of fpgaconvnet-optimiser and fpgaconvnet-model


### Usage
'''
python relu_main.py
'''

### Flags
- **arch**: model_name
- **relu-policy**: relu policy choice between slowest_node and uniform
- **fixed-hardware**: Uses fixed-hardware and does not run optimiser. Must provide "platform_path", and "optimised_config_path" flags to load fixed hardware
- **normalise-hardware**: Runs optimiser on same DSPs for dense and no skipping windows
- **accuracy_path**: "model_path". For fixed hardware
- **model_path**: Path to sparse .onnx model.
- **platform_path**: Path to platform specs (.toml). For fixed hardware
- **gpu**
- **enable-wandb**

### Parameters you may want to vary
- **THRESHOLD_INC in relu_main.py**: Amount you want to increase ReLU by for each iteration
- **--gain flag in fpgaconvnet-optimiser cli**: Minimum gain to push fine
2 changes: 1 addition & 1 deletion relu_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def layer_name_translation(model_name, onnx_name):
help='how many runs')


parser.add_argument("--sparsity_path", default="runlog/resnet18/uniform_relu_0.0", type=str,
parser.add_argument("--sparsity_path", default="runlog/resnet18/", type=str,
help='Path to sparsity log dir for old sparsity')

parser.add_argument("--accuracy_path", default="runlog/resnet18/uniform_accuracy.csv", type=str,
Expand Down

0 comments on commit 40701a0

Please sign in to comment.