Thank you for your interest in SynapSwap! We welcome and appreciate contributions of all kinds — whether you are fixing bugs, improving performance, refining the architecture, or introducing new features.
By contributing, you help make advanced AI inference more accessible on consumer-grade hardware.
Before submitting any code, please consider opening an Issue to:
- Report unexpected behavior, crashes, or regressions
- Propose a new feature (e.g., support for an additional backend)
- Discuss architectural or performance improvements
Clear, well-documented issues help ensure productive discussions and efficient development.
-
Fork the repository
-
Create a topic branch:
git checkout -b feature/your-feature-name
-
Implement your changes
-
Ensure the project builds cleanly without warnings:
make clean && make -
Commit your changes with clear, descriptive messages
-
Push your branch to your fork and open a Pull Request
Each Pull Request should clearly explain the motivation, scope, and impact of the changes.
To keep the codebase clean, portable, and maintainable, SynapSwap follows these conventions:
-
Language: Strict C99 (for maximum portability)
-
Naming Conventions:
- Public API functions:
synapswap_function_name() - Internal functions:
internal_function_name()or_function_name() - Variables:
snake_case(e.g.,vram_limit)
- Public API functions:
-
Documentation:
- Use Doxygen-style comments (
/** ... */) for all public functions declared in.hfiles
- Use Doxygen-style comments (
-
Memory Management:
- Every
synapswap_malloc()must have a correspondingsynapswap_free() - Memory leaks are not tolerated
- Every
If you want to dive into the internals, the following reading order is recommended:
-
include/synapswap.hPublic API exposed to users and external runtimes -
src/core/intercept.cEntry point responsible for intercepting and managing memory allocations -
src/core/scheduler.cGraph-aware logic that determines what to swap, when, and why -
src/core/transfer_engine.cBackground thread and PCIe transfer management (asynchronous engine)
Any major feature or architectural change must be accompanied by tests located in the tests/ directory.
Before submitting your Pull Request, please run the stress tests to validate stability and correctness:
make
./synapswap_testPlease be respectful, constructive, and supportive of fellow contributors. We value a collaborative environment where newcomers feel welcome and experienced developers can exchange ideas openly.
Harassment, hostility, or disrespectful behavior will not be tolerated.
Thank you again for helping improve SynapSwap.
DamienOS