From 6fe5ff30283260f73ae08080305ebc097cb92027 Mon Sep 17 00:00:00 2001 From: Zain Dana Harper Date: Tue, 7 Jul 2026 09:19:28 -0700 Subject: [PATCH] release: v1.2.0 General GPU compute release: #[compute] kernels compile to valid SPIR-V, dispatch on a real Vulkan device, and seal a re-checkable GPU receipt (Phases 1-4a), plus the dimensional-analysis units core, receipt Wave 4 (self-test, chain, corpus), four new invariant kernels, typed Array params/returns, and the README visual-identity and docs refresh. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 87 ++++++++++++++++++++++++++++++++++----------- README.md | 4 +-- USAGE.md | 4 +-- compiler/Cargo.lock | 2 +- compiler/Cargo.toml | 2 +- 5 files changed, 73 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2adf1500..b6d5d528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,73 @@ tracked in `STATUS.md`, `README.md`, and `docs/COMPILER_WIND_DOWN_ASSESSMENT_2026-06-15.md`; historical counts such as `108/108` or `132/132` are not the current release gate. +## 1.2.0 - 2026-07-07 - general GPU compute + +BuildLang programs now run real work on the GPU: `#[compute]` kernels compile +to valid SPIR-V, dispatch on an actual Vulkan device, and seal a re-checkable +GPU receipt. Minor release (backward compatible; programs that do not use the +GPU path or the new flags are unaffected). + +- **General GPU execution path (Layers A/B/C)**: Layer A emits valid, + dispatchable compute SPIR-V for `#[compute]` kernels; Layer B/C perform a + real Vulkan dispatch on the device and seal a GPU receipt. A NUL-byte entry + name is now a typed error instead of a panic. +- **GPU Phase 1 (arbitrary elementwise f32 kernels)**: dispatch and CPU + cross-check generalized from a fixed demo to arbitrary elementwise kernels, + with writability inference, scalar push constants in the SPIR-V interface, + and a clear diagnostic refusing `f64` on the f32-only GPU path. +- **GPU Phase 2 (2D grids + matmul)**: per-kernel 2D workgroup size, a 2D + dispatch grid, matmul shape validation in the Vulkan host, an in-kernel + bounds guard for arbitrary dims, and rejection of non-workgroup-multiple + matmul dims (out-of-bounds guard). Cross-checked against an identity + closed-form sanity case. +- **GPU Phase 3 (1D stencil)**: a 3-point clamped-blur stencil kernel with a + u32-length 1D driver, clamped-edge sanity checks, and Layer A emit + device + match + boundary + negative tests. +- **GPU Phase 4a (workgroup shared memory + barrier)**: device-free machinery + for workgroup-shared scratch memory and barriers, a distinct `Workgroup` + `OpVariable` per scratch local, effect-gating tests, and a dead + Function-storage variable skipped for workgroup-slot locals. +- **SPIR-V correctness fixes**: nested structured control flow corrected via + dominator analysis (selection-in-loop nesting covered), void/unit stores + skipped, constant-operand signedness reconciled in integer binops, and + integer binops typed from the non-constant operand (const-left case). +- **Dimensional analysis (typed physical units), first slice**: a pure, + dependency-free core (`compiler/src/units.rs`, public as `buildlang::units`) + models a physical dimension as integer exponents over the seven SI base + dimensions, with the checked algebra (multiply/divide/power; add, subtract, + and compare require equal dimensions), a parser for a compact unit grammar + (`m/s`, `kg*m/s^2`, `1/s`, `J`), and a canonical formatter. + `buildc run --emit-receipt --units ` canonicalizes the declared unit + through this core: a malformed or unknown unit is a hard error before any + compilation, and a valid unit is sealed into the scientific-runtime + receipt's `measurement.units` in its checked canonical form (so `m*s^-1` + and `m/s` seal identically and the receipt still re-verifies). Honest + scope: unit annotation and receipt-label checking only; `f64` is not + yet a first-class type in the checker (integration specced in + `docs/DIMENSIONAL-ANALYSIS.md`). Backward compatible: `run` without + `--units` is byte-identical. Coverage: 18 core unit tests plus 2 CLI + integration tests. +- **Receipt Wave 4**: `receipt verify --self-test` proves the verifier can + FAIL; `receipt chain build` / `chain verify` seal a tamper-evident receipt + bundle (the index is bound into the chain seal; all 4 failure classes + covered); `receipt corpus` gates the example suite on declared + classifications. Non-byte-reproducible receipt seals documented as + by-design. +- **Invariant family grown to seven members**: added `non-negative` + (algorithmic accountability), a reaction invariant checker (chemistry + demo), a Born-rule normalization kernel (quantum conservation), and a + funnel-hashing probe-bound kernel (algorithmic). README and STATUS synced + to the family. +- **Typed `Array` as function parameter and return type**: fixed-size + arrays can now be passed to and returned from functions (returns lower via + an out-param). Documented in the math-syntax guide. +- **Docs and visual identity**: spectrum banner and feature-first README + header and body, a current introduction, and a live crates.io version badge + plus a downloads badge (replacing the hardcoded version badge). Stale + stencil exclusions dropped from host and packer comments. +- Sealed receipt corpus regenerated for corrected `&mut` MIR mutability. + ## 1.1.0 - 2026-07-02 - accountable scientific compute A second, independent receipt family beyond the capability (check) receipts: @@ -78,26 +145,6 @@ this cycle (granular entries follow): ## Unreleased -- Dimensional analysis (typed physical units), first slice: a new pure, - dependency-free core (`compiler/src/units.rs`, public as `buildlang::units`) - represents a physical dimension as a vector of integer exponents over the - seven SI base dimensions (metre, kilogram, second, ampere, kelvin, mole, - candela). It provides the checked algebra a type checker needs (multiply / - divide add / subtract exponents; power scales them; ADD / SUBTRACT / COMPARE - require EQUAL dimensions, and a mismatch is a `UnitError::Mismatch`), a parser - for a compact unit grammar (`m/s`, `kg*m/s^2`, `1/s`, `J`), and a canonical - formatter. `buildc run --emit-receipt --units ` now canonicalizes the - declared unit through this core: a malformed or unknown unit is a hard error - reported before any compilation (no receipt is written), and a valid unit is - sealed into the scientific-runtime receipt's `measurement.units` as its - CHECKED canonical form (so `m*s^-1` and `m/s` seal identically and the receipt - still re-verifies). Honest scope: this is unit-ANNOTATION and receipt-label - checking; it does NOT yet make `f64` a first-class type in the - Hindley-Milner checker (that integration is specced in - `docs/DIMENSIONAL-ANALYSIS.md`), and the C backend carries no unit metadata at - runtime. Backward compatible: `run` without `--units` is byte-identical. - Coverage: 18 core unit tests plus 2 CLI integration tests (a canonicalized - unit sealed and re-verified, and an unknown unit rejected before compile). - Type system (linear types / no-cloning): an opt-in `#[linear]` attribute on a struct or enum marks its values as a tracked resource that may be moved / consumed **at most once**. The type checker now rejects use-after-consume diff --git a/README.md b/README.md index e5f3fd1d..adbb11b6 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ profile and print a receipt: buildc check examples/quickstart/hello.bld --profile console-only --receipt - ``` -Output (excerpt, verified against buildc 1.1.0): +Output (excerpt, verified against buildc 1.2.0): ``` Type checking... OK @@ -136,7 +136,7 @@ Type checking... OK No errors found in 'examples/quickstart/hello.bld' { "schema": "buildlang-check-receipt/v1", - "compiler_version": "1.1.0", + "compiler_version": "1.2.0", "status": "passed", "declared_effects": { "main": ["Console"] }, ... diff --git a/USAGE.md b/USAGE.md index 47134807..c420ce89 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,7 +7,7 @@ with additional experimental backends. All commands and flags below are taken from the compiler's actual CLI definition (`compiler/src/main.rs`). The worked examples were run against a -local build of `buildc` 1.1.0 on Windows; the captured output is shown +local build of `buildc` 1.2.0 on Windows; the captured output is shown verbatim. Output captured from an actual run is marked **(verified)**; any output that was not run is marked **(illustrative)**. @@ -174,7 +174,7 @@ No errors found in 'examples/quickstart/hello.bld' { "schema": "buildlang-check-receipt/v1", "compiler": "buildc", - "compiler_version": "1.1.0", + "compiler_version": "1.2.0", "language_version": "1.0.0", ... "status": "passed", diff --git a/compiler/Cargo.lock b/compiler/Cargo.lock index 0d4e3712..5c0ba940 100644 --- a/compiler/Cargo.lock +++ b/compiler/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "buildlang" -version = "1.1.0" +version = "1.2.0" dependencies = [ "ash", "bumpalo", diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index fae58fbf..f4eaa89d 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -7,7 +7,7 @@ [package] name = "buildlang" -version = "1.1.0" +version = "1.2.0" edition = "2021" rust-version = "1.70" authors = ["Zain Dana Harper"]