Skip to content

Commit 128d72c

Browse files
committed
fix: expand benchmarking readme
1 parent 8423247 commit 128d72c

File tree

6 files changed

+107
-9
lines changed

6 files changed

+107
-9
lines changed

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Contributing to JaxADi
2+
3+
We're thrilled that you're interested in contributing to JaxADi! This document outlines the process for contributing to this project.
4+
5+
## How to Contribute
6+
7+
There are many ways to contribute to JaxADi:
8+
9+
1. Reporting bugs
10+
2. Suggesting enhancements
11+
3. Writing documentation
12+
4. Submitting code changes
13+
14+
### Reporting Bugs
15+
16+
1. Check the [issue tracker](https://github.com/based-robotics/jaxadi/issues) to see if the bug has already been reported.
17+
2. If not, create a new issue. Provide a clear title and description, as much relevant information as possible, and a code sample or executable test case demonstrating the bug.
18+
19+
### Suggesting Enhancements
20+
21+
1. Check the [issue tracker](https://github.com/based-robotics/jaxadi/issues) to see if the enhancement has already been suggested.
22+
2. If not, create a new issue. Clearly describe the enhancement, why it would be useful, and any potential drawbacks.
23+
24+
### Writing Documentation
25+
26+
Good documentation is crucial. If you notice any part of our documentation that could be improved or expanded, please let us know or submit a pull request with your suggested changes.
27+
28+
### Submitting Code Changes
29+
30+
1. Fork the repository.
31+
2. Create a new branch for your changes.
32+
3. Make your changes in your branch.
33+
4. Add or update tests as necessary.
34+
5. Ensure the test suite passes.
35+
6. Update the documentation as needed.
36+
7. Push your branch and submit a pull request.
37+
38+
## Pull Request Process
39+
40+
1. Ensure your code follows the project's style guidelines.
41+
2. Update the README.md or relevant documentation with details of changes, if applicable.
42+
3. Add tests for your changes and ensure all tests pass.
43+
4. Your pull request will be reviewed by the maintainers. They may suggest changes or improvements.
44+
5. Once approved, your pull request will be merged.
45+
46+
<!-- TODO:
47+
48+
## Style Guidelines
49+
50+
We use Ruff to enforce our code style and linting rules....
51+
```bash
52+
pip3 install pre-commit
53+
```
54+
```bash
55+
pre-commit install
56+
``` -->

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ JAXADI can be particularly useful in scenarios involving:
1616
- Robotics simulations
1717
- Optimal control problems
1818
- Machine learning models with complex dynamics
19-
- Large-scale numerical optimizations
2019

2120
## Installation
2221

@@ -65,6 +64,12 @@ output = jax_fn(input_x, input_y)
6564

6665
```
6766

67+
<strong>Note:</strong> For now translation does not support functions with very
68+
large number of operations, due to the translation implementation. Secret component of
69+
translation is work-tree expansion, which might lead to large overhead in number of
70+
symbols. We are working on finding the compromise in both speed and extensive
71+
functions support.
72+
6873
## Examples
6974

7075
JAXADI comes with several examples to help you get started:
@@ -85,11 +90,27 @@ JAXADI comes with several examples to help you get started:
8590
8691
## Performance Benchmarks
8792

93+
![speedup](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/speedup_ratio.png?raw=true)
94+
8895
The process of benchmarking and evaluating the performance of Jaxadi is described in the [benchmarks](benchmarks/README.md) directory.
8996

90-
<!-- ## Contributing
97+
## Contributing
98+
99+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.
91100

92-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details. -->
101+
## Citation
102+
103+
If you use JaxADi in your research, please cite it as follows:
104+
105+
```bibtex
106+
@misc{jaxadi2024,
107+
title = {JaxADi: Bridging CasADi and JAX for Efficient Numerical Computing},
108+
author = {Alentev, Igor and Kozlov, Lev and Nedelchev, Simeon},
109+
year = {2024},
110+
url = {https://github.com/based-robotics/jaxadi},
111+
note = {Accessed: [Insert Access Date]}
112+
}
113+
```
93114

94115
## Acknowledgements
95116

benchmarks/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@ Adding the complexity of setup of benchmarks of [cusadi](https://github.com/se-h
99
Due limitations we cover only the functions with less than 1e3 operations. All of them are located in the [data](data) directory.
1010

1111
One may run the benchmarks in the colab environment and get the [cusadi results](cuda_benchmark_results.npz) and [jaxadi results](jax_benchmark_results.npz) for comparison.
12+
13+
#### Overview
14+
15+
This analysis compares the performance of two computational tools, **Jaxadi** and **Cusadi**, using a range of batch sizes for different operations. The tools are evaluated based on average computation times and their relative speedup across various workloads.
16+
17+
![1e1](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/compare_1e1_bar.png?raw=true)
18+
19+
![1e2](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/compare_1e2_bar.png?raw=true)
20+
21+
![Speedup](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/speedup_ratio.png?raw=true)
22+
23+
#### Key Findings
24+
25+
- **Jaxadi's Consistent Advantage:** Across all tested scenarios, Jaxadi consistently shows better performance than Cusadi. This is evident from the lower average computation times for Jaxadi, particularly as the workload increases.
26+
27+
- **Scalability Differences:** As batch sizes grow, the gap between the two tools becomes more pronounced. Cusadi's computation time increases rapidly with larger batch sizes, especially beyond \(2^{12}\). In contrast, Jaxadi maintains a more stable performance with a much slower increase in computation time, indicating better batch scalability.
28+
29+
#### Conclusion
30+
31+
Overall, Jaxadi offers a clear performance advantage over Cusadi, particularly for small functions which can be translated propely.

docs/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757
<div class="column has-text-centered">
5858
<h1 class="title is-1 publication-title">JAXADI</h1>
5959
<div class="is-size-5 publication-authors">
60-
<span class="author-block">
61-
<a href="https://github.com/lvjonok">Lev Kozlov</a><sup>1</sup>,</span>
6260
<span class="author-block">
6361
<a href="https://me.m8pie.xyz">Igor Alentev</a><sup>1</sup>,</span>
62+
<span class="author-block">
63+
<a href="https://github.com/lvjonok">Lev Kozlov</a><sup>1</sup>,</span>
6464
<span class="author-block">
6565
<a href="https://simeon-ned.com/">Simeon Nedelchev</a><sup>2</sup>,
6666
</span>
@@ -207,11 +207,12 @@ <h2 class="title is-3">Related Links</h2>
207207
<section class="section" id="BibTeX">
208208
<div class="container is-max-desktop content">
209209
<h2 class="title">BibTeX</h2>
210-
<pre><code> @misc{jaxadi_2024,
211-
author = {Kozlov, Lev and Alentev, Igor and Nedelchev, Simeon},
212-
title = {jaxadi},
210+
<pre><code>@misc{jaxadi2024,
211+
title = {JaxADi: Bridging CasADi and JAX for Efficient Numerical Computing},
212+
author = {Alentev, Igor and Kozlov, Lev and Nedelchev, Simeon},
213213
year = {2024},
214-
howpublished = {\url{https://github.com/based-robotics/jaxadi}},
214+
url = {https://github.com/based-robotics/jaxadi},
215+
note = {Accessed: [Insert Access Date]}
215216
}
216217
</code></pre>
217218
</div>
-110 KB
Binary file not shown.
-114 KB
Binary file not shown.

0 commit comments

Comments
 (0)