-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: solve problem with different shapes in input * feat: start landing * fix: favicon * feat: add benchmark util func * fix: try cuda first * fix: merge new translate * fix: outputs * fix: try with memory cleaning * fix: change order of jit vmap * fix: increase batch * fix: prints * fix: no tqdm * feat: increase the batch * fix: reduce * fix: no tqdm * feat: add visualize demo * feat: add notebook from colab * fix: plots * feat: add patches and update readme * fix: benchmarks on landing * fix: landing * fix: landing * fix: expand benchmarking readme * fix: bump version --------- Co-authored-by: Lev Kozlov <[email protected]>
- Loading branch information
Showing
41 changed files
with
4,257 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Contributing to JaxADi | ||
|
||
We're thrilled that you're interested in contributing to JaxADi! This document outlines the process for contributing to this project. | ||
|
||
## How to Contribute | ||
|
||
There are many ways to contribute to JaxADi: | ||
|
||
1. Reporting bugs | ||
2. Suggesting enhancements | ||
3. Writing documentation | ||
4. Submitting code changes | ||
|
||
### Reporting Bugs | ||
|
||
1. Check the [issue tracker](https://github.com/based-robotics/jaxadi/issues) to see if the bug has already been reported. | ||
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. | ||
|
||
### Suggesting Enhancements | ||
|
||
1. Check the [issue tracker](https://github.com/based-robotics/jaxadi/issues) to see if the enhancement has already been suggested. | ||
2. If not, create a new issue. Clearly describe the enhancement, why it would be useful, and any potential drawbacks. | ||
|
||
### Writing Documentation | ||
|
||
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. | ||
|
||
### Submitting Code Changes | ||
|
||
1. Fork the repository. | ||
2. Create a new branch for your changes. | ||
3. Make your changes in your branch. | ||
4. Add or update tests as necessary. | ||
5. Ensure the test suite passes. | ||
6. Update the documentation as needed. | ||
7. Push your branch and submit a pull request. | ||
|
||
## Pull Request Process | ||
|
||
1. Ensure your code follows the project's style guidelines. | ||
2. Update the README.md or relevant documentation with details of changes, if applicable. | ||
3. Add tests for your changes and ensure all tests pass. | ||
4. Your pull request will be reviewed by the maintainers. They may suggest changes or improvements. | ||
5. Once approved, your pull request will be merged. | ||
|
||
<!-- TODO: | ||
## Style Guidelines | ||
We use Ruff to enforce our code style and linting rules.... | ||
```bash | ||
pip3 install pre-commit | ||
``` | ||
```bash | ||
pre-commit install | ||
``` --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Benchmarking | ||
|
||
In order to evaluate the performance of the `jaxadi` library vs `cusadi` we have tried to reproduce the benchmarks from the `cusadi` library first and faced some issues with the proper `cuda` installation. | ||
|
||
![meme](https://preview.redd.it/explain-please-v0-ma2mz5wxftod1.jpeg?auto=webp&s=2b90dfa3b12e064f54333e1080b3dabbad914f48) | ||
|
||
Adding the complexity of setup of benchmarks of [cusadi](https://github.com/se-hwan/cusadi) we have copied and modified the benchmarks to be able to run them in the [`colab` environment](https://colab.research.google.com/github/based-robotics/jaxadi/blob/feature%2Fbenchmarking/benchmarks/jaxadi_vs_cusadi.ipynb) side by side (CUDA vs Jax). | ||
|
||
Due limitations we cover only the functions with less than 1e3 operations. All of them are located in the [data](data) directory. | ||
|
||
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. | ||
|
||
#### Overview | ||
|
||
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. | ||
|
||
![1e1](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/compare_1e1_bar.png?raw=true) | ||
|
||
![1e2](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/compare_1e2_bar.png?raw=true) | ||
|
||
![Speedup](https://github.com/based-robotics/jaxadi/blob/master/docs/static/images/speedup_ratio.png?raw=true) | ||
|
||
#### Key Findings | ||
|
||
- **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. | ||
|
||
- **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. | ||
|
||
#### Conclusion | ||
|
||
Overall, Jaxadi offers a clear performance advantage over Cusadi, particularly for small functions which can be translated propely. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
jhpnnagiieahaaaadaaaaaaaaaaaaaaaaafaegaakaaaaaaadfifgefhogdgehjgpgogcaaaaaaagaaaaaaaggogpfbdfgbdaaaabaaabagaaaaaaaeaaaaaaaaaaaaaaababababadaaaaaaaaaaaaaaabababaeaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeggaaaaaaaaaaaaaaacaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaa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aaaaacbaaaaaaaaaaaaaabaaaaaaaeaaaaaaaaaaaaaaachaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaadaaaaaaaiepfadegpcaaaaaaaaaaaaaadaaaaaaaiepfbdegpcaaaaaaaaaaaaaadaaaaaaaiepfcdegpcaaaaaaaaaaaaaadaaaaaaaiepfddchbaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaadaaaaaaadgpfadegpcaaaaaaaaaaaaaadaaaaaaadgpfbdchbaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaadaaaaaaabepfadegpcaaaaaaaaaaaaaadaaaaaaabepfbdchcaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaabaaaaaaacgbaaaaaaahdaaaaaaaaaaaaaacbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapbaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachgaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaachllnlhnjnpnmhlnndegeaaaaaaaaaaaaaaachkaaaaaaaaaaaaaaachabaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaachmaaaaaaaaaaaaaaachabaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachcbaaaaaaaaaaaaaachkaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachoaaaaaaaaaaaaaaachdbaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaachabaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachfbaaaaaaaaaaaaaachmaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachnaaaaaaaaaaaaaaachgbaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaachpaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaachfbaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachibaaaaaaaaaaaaaachjbaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaachhbaaaaaaaaaaaaaachkbaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachfbaaaaaaaaaaaaaachkaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachmbaaaaaaaaaaaaaachlaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachlbaaaaaaaaaaaaaachnbaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachebaaaaaaaaaaaaaachobaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachmaaaaaaaaaaaaaaachcbaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachpaaaaaaaaaaaaaaachacaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachhbaaaaaaaaaaaaaachlbaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachbcaaaaaaaaaaaaaachccaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaachpbaaaaaaaaaaaaaachdcaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachcbaaaaaaaaaaaaaachecaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaachfcaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaachnbaaaaaaaaaaaaaachkbaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachlbaaaaaaaaaaaaaachecaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaachhcaaaaaaaaaaaaaachicaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachfbaaaaaaaaaaaaaachjcaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachgcaaaaaaaaaaaaaachkcaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaachlcaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaachkaaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaachlaaaaaaaaaaaaaaabaaaaaaaaaaaaaaachpaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaancaaaaaaaaaaaaaabaaaaaaaaaaaaaaancaaaaaabaaaaaaaaaaaaaaaaaaaaaaamcaaaaaacaaaaaaallnlhnjnpnmhlnndbaaaaaaabaaaaaaabaaaaaaacaaaaaaaeaaaaaaadaaaaaaaaaaaaaaabaaaaaaancaaaaaaeaaaaaaacaaaaaaaaaaaaaaaeaaaaaaafaaaaaaaeaaaaaaabaaaaaaancaaaaaagaaaaaaadaaaaaaaaaaaaaaadaaaaaaahaaaaaaafaaaaaaaaaaaaaaabaaaaaaahaaaaaaagaaaaaaahaaaaaaancaaaaaaiaaaaaaacaaaaaaabaaaaaaancaaaaaajaaaaaaaaaaaaaaacaaaaaaaeaaaaaaakaaaaaaajaaaaaaabaaaaaaadaaaaaaalaaaaaaakaaaaaaaeaaaaaaacaaaaaaalaaaaaaaiaaaaaaalaaaaaaancaaaaaamaaaaaaaaaaaaaaadaaaaaaabaaaaaaamaaaaaaamaaaaaaacaaaaaaadaaaaaaanaaaaaaajaaaaaaakaaaaaaacaaaaaaanaaaaaaamaaaaaaanaaaaaaaeaaaaaaaoaaaaaaalaaaaaaanaaaaaaadaaaaaaapaaaaaaakaaaaaaaaaaaaaaancaaaaaaabaaaaaabaaaaaaabaaaaaaacaaaaaaapaaaaaaapaaaaaaaabaaaaaadaaaaaaabbaaaaaaoaaaaaaapaaaaaaacaaaaaaahaaaaaaahaaaaaaabbaaaaaadaaaaaaabbaaaaaaeaaaaaaafaaaaaaacaaaaaaabbaaaaaacaaaaaaabbaaaaaadaaaaaaalaaaaaaalaaaaaaaoaaaaaaacaaaaaaabbaaaaaabbaaaaaalaaaaaaaeaaaaaaahaaaaaaahaaaaaaabbaaaaaadaaaaaaafaaaaaaafaaaaaaahaaaaaaabaaaaaaadaaaaaaadaaaaaaafaaaaaaaeaaaaaaapaaaaaaapaaaaaaanaaaaaaadaaaaaaaoaaaaaaaoaaaaaaahaaaaaaacaaaaaaapaaaaaaapaaaaaaaoaaaaaaadaaaaaaakaaaaaaakaaaaaaapaaaaaaabaaaaaaadaaaaaaadaaaaaaakaaaaaaafaaaaaaadaaaaaaadaaaaaaadaaaaaaaocaaaaaaaaaaaaaadaaaaaaaaaaaaaaaocaaaaaaaaaaaaaapaaaaaaabaaaaaaaocaaaaaabaaaaaaabaaaaaaaaaaaaaaancaaaaaabaaaaaaaaaaaaaaabaaaaaaaocaaaaaabaaaaaaabaaaaaaabaaaaaaaocaaaaaabaaaaaaaeaaaaaaacaaaaaaaocaaaaaabaaaaaaajaaaaaaadaaaaaaaocaaaaaabaaaaaaamaaaaaaaeaaaaaaaocaaaaaabaaaaaaaiaaaaaaafaaaaaaaocaaaaaabaaaaaaaeaaaaaaagaaaaaaaocaaaaaabaaaaaaaiaaaaaaahaaaaaaaocaaaaaabaaaaaaacaaaaaaaiaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaocaaaaaacaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaabaaaaaaabaaaaaaabaaaaaaocaaaaaacaaaaaaaabaaaaaabaaaaaaaocaaaaaacaaaaaaagaaaaaaacaaaaaaabadaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaacaaaaaaaaaaaaaaachmcaaaaaaaaaaaaaachjcaaaaaaaaaaaaaachdaaaaaaaaaaaaaaajaaaaaaaaaaaaaaachabaaaaaaaaaaaaaachhaaaaaaaaaaaaaaachmaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaachibaaaaaaaaaaaaaachnaaaaaaaaaaaaaaachmaaaaaaaaaaaaaaachnaaaaaaaaaaaaaaachpaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaadaaaaaaaaaaaaaaachncaaaaaaaaaaaaaachocaaaaaaaaaaaaaachoaaaaaaaaaaaaaaa |
Oops, something went wrong.