You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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....
**JaxADi** is a powerful Python library designed to bridge the gap between `casadi.Function` and JAX-compatible functions. By leveraging the strengths of both CasADi and JAX, JAXADI opens up exciting opportunities for building highly efficient, batchable code that can be executed seamlessly across CPUs, GPUs, and TPUs.
11
13
12
14
JAXADI can be particularly useful in scenarios involving:
13
15
14
16
- Robotics simulations
15
17
- Optimal control problems
16
18
- Machine learning models with complex dynamics
17
-
- Large-scale numerical optimizations
18
-
19
19
20
20
## Installation
21
21
22
22
You can install JAXADI using pip:
23
+
23
24
<!-- Change once it will be realeased -->
24
25
25
26
```bash
26
27
pip install jaxadi
27
28
```
28
29
29
-
For a complete environment setup, we recommend using Conda/Mamba:
30
+
For a complete environment setup for examples, we recommend using Conda/Mamba:
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.
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).
8
+
9
+
Due limitations we cover only the functions with less than 1e3 operations. All of them are located in the [data](data) directory.
10
+
11
+
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.
-**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.
0 commit comments