Skip to content

Update readme.md #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
### Readme
# Benchmark Source Code for ACORNS

This contains all of the code used to generate JSON benchmarks and graphs for ACORNS: An easy-to-use Code Generator for Gradients and Hessians
This repository contains all of the code used to generate JSON benchmarks and graphs for ["ACORNS: An easy-to-use Code Generator for Gradients and Hessians"](https://arxiv.org/abs/2007.05094).

### About acorns
### About ACORNS

Please refer to the following repo for the package: https://github.com/deshanadesai/acorns
Please refer to the following repo for the usage of the ACORNS package: https://github.com/deshanadesai/acorns

This is NOT the repository for the acorns library. And is not maintained. This repository only contains code for the benchmarks for comparisons with other methods.
This is NOT the repository for the ACORNS library and is not actively maintained. This repository only contains code for the benchmarks for comparisons with other methods.

### Prerequisites

In order to run the benchmarking you need Pytorch installed, Adept installed, Java1.8 or higher and GCC9.
In order to run the benchmarking you need PyTorch, Adept, Java (1.8 or higher) and GCC-9 installed.
- To intall PyTorch simply using pip you can simply type `pip install torch`
- To install Adept follow the instructions found [here](http://www.met.reading.ac.uk/clouds/adept/documentation.html)
- *NOTE*: Adept has been installed ONLY with `./configure` and the scripts rely on the location of the binaries.
- On a mac you can find a working version of GCC9 with Homebrew and install it with `brew install gcc@9`
- In order to graph you must have `matplotlib` installed which can be installed through pip.
- On a mac you can find a working version of GCC-9 with Homebrew and install it with `brew install gcc@9`
- In order to generate the graphs, you need `matplotlib` installed which is available through `pip install matplotlib`.

### Benchmarking Overview

This hosts all of the code used to generate the data and graphs for [ACORNS](https://arxiv.org/abs/2007.05094)
There are 5 main functions that generate the data:
There are 5 main functions that are used to generate the data:
1. `tests/updated_test_suite.py` - This runs ACORNS against PyTorch, Adept, Mitsuba, Enoki and Tapenade with respect to 2 hardcoded functions:
- `((k*k+3*k)-k/4)/k+k*k*k*k+k*k*(22/7*k)+k*k*k*k*k*k*k*k*k`
- `sin(k) + cos(k) + pow(k, 2)`
Expand All @@ -45,7 +45,7 @@ We graph our runtimes against all of the competitors in `./tests/graph/` folder.

### Real World Example

In our paper we outline how we used this in a PolyFEM application. This was very complex and the C code was too big to include here. As such we simple calculated the times in JSON which can be found in the `./tests/complex/data`
In our paper we outline how we used this in a [PolyFEM](https://polyfem.github.io/) application. We do not include all the external codebase here. However, we recorded the times in JSON, which can be found in the folder `./tests/complex/data`

1. To graph file generation time run `./tests/complex/graph_file_gen.py`
2. To graph file sizes run `./tests/complex/graph_file_sizes.py`
Expand Down