Some checks failed
jouleclaw fabrics / cuda (linux, RTX 4050 + Vulkan loader) (pull_request) Successful in 18s
jouleclaw fabrics / vulkan (linux, RTX 4050 + Vulkan loader) (pull_request) Successful in 18s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 5s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 43s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 2m25s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 2m4s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 55s
standards workspaces build + test / map-rs (map-conformance, map/map-rs, map-rs, linux-arm64) (pull_request) Successful in 58s
standards workspaces build + test / aac-rs (aac-conformance, aac/aac-rs, aac-rs, linux-arm64) (pull_request) Successful in 3m17s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 56s
standards workspaces build + test / openpay (openpay, openpay, linux-arm64) (pull_request) Successful in 3m19s
jouleclaw fabrics / metal (macOS, Apple GPU) (pull_request) Successful in 42s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 59s
standards workspaces build + test / macOS energy backends (pull_request) Failing after 3m58s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 2m37s
standards workspaces build + test / arl-rs (arl/arl-rs, arl-rs, linux) (pull_request) Successful in 1m9s
standards workspaces build + test / eoc-rs (eoc/eoc-rs, -p eoc-meter --features cuda, eoc-rs, linux) (pull_request) Successful in 2m7s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Successful in 1m42s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 1m13s
standards workspaces build + test / joulehook-rs (joulehook/joulehook-rs, joulehook-rs, linux) (pull_request) Successful in 1m13s
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Successful in 1m36s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m23s
standards workspaces build + test / sense-rs (sense/sense-rs, sense-rs, linux) (pull_request) Successful in 1m14s
standards workspaces build + test / smart-byte-rs (smart-byte/smart-byte-rs, smart-byte-rs, linux) (pull_request) Successful in 4m10s
10983 -> 0, and `jouleclaw-omni --features metal` joins the `-D warnings`
clippy step in standards-build.yml, so it cannot regress. The pinned
ratchet added earlier is deleted: a denial is strictly stronger than a
count that may not rise.
The honest accounting, because "zero" is doing some work in that sentence:
6774 fixed by `cargo clippy --fix` (earlier commit)
3896 allowed as crate policy, grouped with reasons (earlier commit)
282 allowed here, grouped with reasons
~31 fixed here
Of the ~31 fixed here, three were defects rather than style:
- the GPT-2 BPE pre-tokenizer regex, which never compiled (its own commit)
- `unet.rs` computed a kernel-size heuristic and shadowed it on the very
next line, so the first was dead; and a `to_q/to_k/to_v` branch returned
the same `cin` as the arm below it
- a `///` block documenting nothing
The rest were mechanical: checked_div for guarded divisions, clone_from,
an `#[ignore]` given its reason, 6.28 -> TAU, 0.6931472 -> LN_2.
Two allows are soundness notes, not style, and say so at the attribute:
- `cast_ptr_alignment` (8): these cast mmap'd GGUF bytes to f32/u16
slices. GGUF aligns tensor data, so they are aligned in practice, but
that is a file-format invariant the type system is not carrying.
bytemuck::try_cast_slice would check it.
- `mut_from_ref` (1): `as_mut_slice(&self)` hands out a `&mut` from a
`&`. It is unsafe and the caller carries aliasing, but the signature
invites misuse.
One allow is a correctness argument against the lint: `manual_clamp`.
`x.min(hi).max(lo)` is not `x.clamp(lo, hi)` for floats, because
`f32::min` returns the non-NaN operand -- the chain scrubs NaN while
clamp propagates it. Taking clippy's advice would let a NaN timestep
through a diffusion schedule.
Verified after every edit, not at the end: 0 errors, 44/44 shaders,
26/26 Metal kernel tests on a GPU, 44 omni tests, 343 loader-gguf tests,
and `clippy -- -D warnings` exits 0.
Co-Authored-By: Claude Opus 5 <[email protected]>
116 lines
4.9 KiB
YAML
116 lines
4.9 KiB
YAML
name: jouleclaw fabrics
|
|
|
|
# Every compute fabric gets built, on hardware that has the device.
|
|
#
|
|
# `metal` did not compile at all -- 3063 errors -- because no job ever built
|
|
# it: 40 architecture files carried `#[cfg(feature = "metal")]` blocks that had
|
|
# never once been compiled. An unbuilt feature does not stay still, it drifts,
|
|
# and nothing here would have noticed. So each fabric's error count is pinned
|
|
# and may fall but never rise.
|
|
#
|
|
# A baseline above zero is a debt, not a pass. Zero means the fabric compiles,
|
|
# which is still not the same as working: none of these runs a kernel yet.
|
|
#
|
|
# `rocm` has no job because `rocm = []` declares a feature with no dependencies
|
|
# and no code. It compiles perfectly while providing nothing, and a green check
|
|
# would report health it does not have.
|
|
#
|
|
# Nightly and path-filtered: the fleet's queue is the scarce resource, and these
|
|
# numbers move only when someone edits this crate.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
schedule:
|
|
# 07:00 UTC daily. Forge cron is UTC.
|
|
- cron: '0 7 * * *'
|
|
pull_request:
|
|
paths:
|
|
- 'jouleclaw/jouleclaw-rs/crates/jouleclaw-omni/**'
|
|
- 'jouleclaw/jouleclaw-rs/Cargo.toml'
|
|
- 'jouleclaw/jouleclaw-rs/Cargo.lock'
|
|
- 'scripts/check-fabric-errors.py'
|
|
- 'scripts/check-metal-shaders.py'
|
|
- '.github/workflows/jouleclaw-fabrics.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
metal:
|
|
name: metal (macOS, Apple GPU)
|
|
# Metal is macOS-only, so this is the one runner that can build it.
|
|
runs-on: macos
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
# launchd's PATH omits cargo on the macOS host runner.
|
|
- name: Put cargo on PATH
|
|
shell: bash
|
|
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: metal's error count may fall, never rise
|
|
shell: bash
|
|
run: python3 scripts/check-fabric-errors.py metal
|
|
# compile_pipeline builds every shader at runtime, so an MSL error is
|
|
# invisible to cargo. xcrun is the same frontend the runtime uses.
|
|
- name: every Metal shader source must compile
|
|
shell: bash
|
|
run: python3 scripts/check-metal-shaders.py
|
|
# Compiling a kernel says nothing about what it computes. This runner
|
|
# has a GPU, so the kernels are dispatched and checked against CPU
|
|
# references here.
|
|
- name: Metal kernels must compute the right thing
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
M=jouleclaw/jouleclaw-rs/Cargo.toml
|
|
# tests/metal_kernels.rs is behind `#![cfg(feature = "metal")]`. If
|
|
# that cfg ever stops holding the file compiles to nothing, the
|
|
# target runs 0 tests, and cargo exits 0 -- a green check for a
|
|
# suite that did not run. Count the tests before trusting the run.
|
|
n=$(cargo test --manifest-path "$M" -p jouleclaw-omni --features metal \
|
|
--test metal_kernels -- --list 2>/dev/null | grep -c ': test$')
|
|
echo "metal_kernels declares $n tests"
|
|
if [ "$n" -lt 26 ]; then
|
|
echo "::error::metal_kernels declares $n tests, expected at least 26."
|
|
echo "::error::Either the metal cfg stopped holding or tests were removed."
|
|
exit 1
|
|
fi
|
|
cargo test --manifest-path "$M" -p jouleclaw-omni --features metal \
|
|
--test metal_kernels
|
|
|
|
linux-fabrics:
|
|
name: ${{ matrix.feature }} (linux, RTX 4050 + Vulkan loader)
|
|
# The host runner, not the docker one: cudarc wants the CUDA toolkit at
|
|
# /usr/local/cuda and ash wants the system Vulkan loader, and this host has
|
|
# both beside an actual NVIDIA GPU. These features have only ever been
|
|
# built on macOS, where neither device exists.
|
|
runs-on: linux-hw
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
feature: [cuda, vulkan]
|
|
steps:
|
|
# This host has no Node, so actions/checkout cannot run here.
|
|
- name: Fetch the source
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
want="${{ github.event.pull_request.head.sha || github.sha }}"
|
|
rm -rf src && mkdir src && cd src
|
|
git init -q
|
|
# Fetch the commit itself, not the ref: a later commit on the ref
|
|
# that this workflow's paths do not match would be fetched instead.
|
|
git fetch -q --depth 1 http://100.64.224.0:3400/Transaction-Science/open-standards.git "$want"
|
|
git checkout -q FETCH_HEAD
|
|
got="$(git rev-parse HEAD)"
|
|
[ "$got" = "$want" ] || { echo "::error::fetched $got, not $want"; exit 1; }
|
|
- name: ${{ matrix.feature }}'s error count may fall, never rise
|
|
shell: bash
|
|
working-directory: src
|
|
run: |
|
|
# nvcc is not on this host's PATH, and cudarc's
|
|
# cuda-version-from-build-system feature asks nvcc which CUDA this is.
|
|
export PATH="$HOME/.cargo/bin:/usr/local/cuda/bin:$PATH"
|
|
python3 scripts/check-fabric-errors.py ${{ matrix.feature }}
|