Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
raptor/pyproject.toml
eagle/python/pyproject.toml

- run: sudo apt-get update && sudo apt-get install -y g++-13 ccache
- run: sudo apt-get update && sudo apt-get install -y g++-13 ccache cppcheck

# compiled objects persist across runs; one cache per job and architecture
- uses: actions/cache@v6
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
raptor/pyproject.toml
eagle/python/pyproject.toml

- run: sudo apt-get update && sudo apt-get install -y g++-13 g++-${{ matrix.gcc }} ccache
- run: sudo apt-get update && sudo apt-get install -y g++-13 g++-${{ matrix.gcc }} ccache cppcheck

# compiled objects persist across runs; one cache per job and architecture
- uses: actions/cache@v6
Expand Down Expand Up @@ -509,7 +509,7 @@ jobs:
raptor/pyproject.toml
eagle/python/pyproject.toml

- run: sudo apt-get update && sudo apt-get install -y g++-13 ccache
- run: sudo apt-get update && sudo apt-get install -y g++-13 ccache cppcheck

# compiled objects persist across runs; one cache per job and architecture
- uses: actions/cache@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:
raptor/pyproject.toml
eagle/python/pyproject.toml

- run: sudo apt-get update && sudo apt-get install -y g++-13
- run: sudo apt-get update && sudo apt-get install -y g++-13 cppcheck

- uses: ./hawk/.github/actions/cuda-toolchain

Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.6.5 (2026-10-23)

A new `c` target emits a kernel as standalone MISRA C:2012: `<name>.c`, `<name>.h` and a
`<name>.embedded.json` report, serial, with a status-returning entry and a plain
structure-of-arrays ABI, bit-identical to the `native` host build and compiled with
`-ffp-contract=off`. `hawk.embedded.export(kernel, directory)` is the engine and
`hawk.build(..., targets=("c",))` the build door, alone or beside `host` and `cuda`, with the
new `embedded_profile=` keyword taking an `EmbeddedProfile`. The `c` target never enters the
eagle manifest, and `hawk.load` and `hawk.artifact.plugins` refuse a build that holds only a `c` unit. A verify pass
runs before emission: it refuses by name what the target does not build (thirteen features, among them random
draws, raw device blocks, reductions over samples and cross-sample reads (`hawk.all_samples`), active-set guards, segmented units, the
compensated sink policy, fused lanes, automatic kernels and libm functions on `Int` operands), records
the worst-case trips, operations and static bytes, classifies every runtime index as proven or
clamped, reports the floating-point domain of each division and root, and applies the
profile's opt-in caps. A text audit and the C compiler (`-std=c99` and `-std=c11`) and
cppcheck's MISRA addon then check the output; the report records the deviations. The
embedded rows need cppcheck and fail rather than skip without it.

`Kernel.source_digest` holds the sha256 of a kernel's source (`None` when it is unavailable) and
reaches the header and the report. `hawk.emit` gains a `Dialect` seam (`Dialect`, `AETHER`,
`render_body(..., dialect=)`): the traversal is unchanged and the CUDA and host output is
byte-identical except for one change: the renderer no longer emits a dead load at the sample
index (`lut_<name>_i = lut_<name>[i]...`) for a lookup or wide-input plane (`Table`, `Wide`) read
twice, nor for a rank>=1 lookup plane (a `Table[Vector[3]]`) read at all.

hawk now requires `aether-dsc>=0.2.7`, which brings `aether_dsc.c_core`, the generator whose
scalar reference functions the `c` target inlines into the unit.

## 0.6.4 (2026-10-22)

**Wheels for more platforms.** Linux aarch64 and macOS arm64 wheels (on macOS, kernels compile with Homebrew's LLVM clang; see the installation page), and Python 3.15 and 3.15t wheels for every platform (the other versions are CPython 3.9-3.14 and free-threaded 3.13t and 3.14t).
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ abstract: "Kernels written once in Python and compiled into the captured graph a
authors:
- family-names: "Masat"
given-names: "Alessandro"
version: "0.6.4"
date-released: "2026-10-22"
version: "0.6.5"
date-released: "2026-10-23"
license: Apache-2.0
repository-code: "https://github.com/amasat01/hawk"
doi: "10.5281/zenodo.23250242"
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ python -m pytest tests -q -m "not gpu" # the gate (.github/workflows/ci.yml)
Most tests also need `eagle` installed as a Python package to run traced kernels. Without it, host artifacts still run through
`hawk.load` and `hawk.run`. The free-threading rows run with `python -m pytest tests -m ft -W error::RuntimeWarning`.

The embedded-C rows (`tests/test_embedded_*.py`) compile the emitted C and run cppcheck's MISRA addon over it, so they need a C
compiler and cppcheck (`brew install cppcheck`, or `apt-get install cppcheck`). Without them the rows fail rather than skip: a
skipped check certifies nothing. `$HAWK_CC` names the C compiler and `$HAWK_CPPCHECK` the cppcheck binary when they are not on
`PATH`.

Docs (`cd docs`): `pip install -r requirements.txt` (it pulls the shared `raptor-docs` package; offline, `pip install ./site` from a
checkout of the landing site). `make strict` (zero warnings), `make linkcheck`, and for notebooks `make nbexec` then `make nbcheck`.
Keep a new notebook under a minute with small committed outputs. `make nbcheck-hosted` runs them as a Colab user would; the comments
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

# Templates and exclusions
templates_path = ["_templates"]
exclude_patterns = ["_templates", "_build", "Thumbs.db", ".DS_Store", "README.md"]
exclude_patterns = ["_templates", "_build", "Thumbs.db", ".DS_Store", "README.md", "superpowers"]

# Two narrow, tooling-internal rough edges, not content bugs:
# - "autodoc": sphinx_autodoc_typehints' autodoc-process-signature hook
Expand Down
1 change: 1 addition & 0 deletions docs/content/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ them may change between releases.
hawk.compile
hawk.runtime
hawk.artifact
hawk.embedded
```
3 changes: 3 additions & 0 deletions docs/content/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ How hawk turns a kernel into something that runs.
- [The compile cache](compile_cache): why building the same kernel twice compiles once.
- [Compile options](compile_options): the flags and profiles a build takes.

The `c` target emits standalone MISRA-C for an embedded build instead of a
native library; see [Embedded C target](embedded.md).

## The compile guard

Two guards keep a compile from running away unseen: a very large source is refused before the
Expand Down
Loading
Loading