Important
These style guides are living documents meant to steer developers towards agreed upon best practices.
📝 Feel free to propose edits 📝
TheRock is the central build/test/release repository for dozens of ROCm subprojects and external builds. Tooling in this repository is shared across multiple repositories.
These are some of our guiding principles:
- Optimize for readability and debuggability
- Explicit is better than implicit
- Don't repeat yourself (DRY)
- You aren't gonna need it (YAGNI)
- Keep it simple, silly (KISS)
- Write portable code where possible, across...
- Operating systems (Linux distributions, Windows)
- Devices (dcgpu, dgpu, igpu, apu, etc.)
- Software versions (e.g. Python)
- Collaborate with upstream projects
We enforce formatting for certain languages using
pre-commit with hooks defined in
.pre-commit-config.yaml.
To get started with pre-commit:
# Download.
pip install pre-commit
# Run locally on staged files.
pre-commit run
# Run locally on all files.
pre-commit run --all-files
# (Optional but recommended)
# Install git hook. Now pre-commit runs on every git commit.
pre-commit install