Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a80179b
Prepare sm_86 Ampere encoder, cubin and discrete runtime port
aien-spark Oct 28, 2026
8cce4a6
Cover Ampere files in portability controls and add pinned x86 probes
aien-spark Oct 28, 2026
2e6bf8c
Fix Ampere host integration gates and preserve explicit numeric cutov…
aien-spark Oct 28, 2026
b026505
Correct Ampere branch and subtraction semantics with independent cont…
aien-spark Oct 28, 2026
1147b0c
Distinguish implicit discarded carry outputs without accepting predic…
aien-spark Oct 28, 2026
3e4145d
Reconcile interrupted Ampere encoder identity with generated source
aien-spark Oct 28, 2026
1b6e3af
Merge remote-tracking branch 'origin/main' into feat/ampere-sm86-port
aien-spark Oct 28, 2026
80c8ed7
Keep encoder mutant checks on portable bridge route
aien-spark Oct 28, 2026
fd9f23b
test(native): cover actual compose capacity refusal in runtime fixture
aien-spark Oct 28, 2026
ae65cd6
fix(components): refuse exhausted branch and tail instruction slots
aien-spark Oct 28, 2026
83c2a8a
test(native): reset compose result sentinel before every call
aien-spark Oct 28, 2026
dbb1b50
docs(components): record per-call capacity status controls
aien-spark Oct 28, 2026
067815f
Record canonical portable Ampere host acceptance and exact opcode con…
aien-spark Oct 28, 2026
1888381
feat(numeric): add portable scalar IEEE f32-to-f16 RNE conversion and…
aien-spark Oct 28, 2026
7b06a75
Keep x86 freestanding half conversion in portable Omega with pinned p…
aien-spark Oct 28, 2026
2e46f5e
Record final forty-root portable half host acceptance
aien-spark Oct 28, 2026
592cee2
Scope AArch64 function-byte probe to AArch64 C targets
aien-spark Oct 28, 2026
060c018
Restrict Ampere offline fixture creation and refresh native acceptance
aien-spark Oct 28, 2026
3b6ca6f
Reconcile accepted native x86 inventory and fixture creation scope
aien-spark Oct 28, 2026
37868ce
Merge remote-tracking branch 'origin/main' into feat/ampere-sm86-port
aien-spark Oct 31, 2026
134c7a6
Merge remote-tracking branch 'origin/main' into feat/ampere-sm86-port
aien-spark Oct 31, 2026
efaf8d7
ampere_nvdisasm: decode each distinct kernel once, concurrently
aien-spark Oct 31, 2026
570b5d6
bw: only LDCU/LDCU64 have uniform destinations everywhere; spec probe…
aien-spark Oct 31, 2026
19d7dc8
Merge remote-tracking branch 'origin/main' into feat/ampere-sm86-port
aien-spark Oct 31, 2026
99ec266
drift: baseline tests/bw_hazard_test.c at omega 6d7b8838's blob; CUDA…
Oct 31, 2026
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
126 changes: 126 additions & 0 deletions .github/workflows/ampere-x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Native x86 execution of checked Omega-to-C units. Only pinned AArch64
# compiler/converter provenance runs under QEMU; no driver submission or GPU.
name: Ampere native x86 host
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
provenance-baseline:
runs-on: ubuntu-24.04-arm
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- name: Source-bootstrap exact baseline on AArch64
run: |
git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge"
git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)"
(cd "$RUNNER_TEMP/omega-bridge" && sh tools/bootstrap.sh)
cp "$RUNNER_TEMP/omega-bridge/build/bootstrap/omc" "$RUNNER_TEMP/baseline-omc"
printf '%s %s\n' 191b776ef98821597c3e30655da6d680a9b66edbc9ceaca3c39c61ea6df098e9 "$RUNNER_TEMP/baseline-omc" | sha256sum --check --strict
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: ampere-baseline-${{ github.sha }}
path: ${{ runner.temp }}/baseline-omc
retention-days: 7
native-x86-host:
needs: provenance-baseline
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
fetch-depth: 0 # Immutable original blobs are required by portable_receipts.
- name: Native scalar numeric portability (no bridge or GPU)
run: make test-ampere-numeric-host
- name: Pinned offline x86 instruction oracle
# Vendor manifest: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0.2.json
# cuda_nvdisasm.linux-x86_64, version 13.0.85. Verification only.
run: |
package=cuda_nvdisasm-linux-x86_64-13.0.85-archive
archive="$RUNNER_TEMP/$package.tar.xz"
curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 \
"https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvdisasm/linux-x86_64/$package.tar.xz" \
--output "$archive"
printf '%s %s\n' 0541e0230f724a43d67288ef882c63351d0c302bf567591b7620d40f93c2c93c "$archive" | sha256sum --check --strict
tar -xJf "$archive" -C "$RUNNER_TEMP" "$package/bin/nvdisasm"
sudo install -D -m755 "$RUNNER_TEMP/$package/bin/nvdisasm" /usr/local/cuda/bin/nvdisasm
/usr/local/cuda/bin/nvdisasm --version
printf '%s\n' /usr/local/cuda/bin >> "$GITHUB_PATH"
git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge"
git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: ampere-baseline-${{ github.sha }}
path: ${{ runner.temp }}/baseline
- name: EMULATED provenance oracle, NATIVE x86 consumers
# Bare ARM compiler/converter/checker executions are required by the
# unchanged gate. Register only AArch64 ELF, only on this disposable VM.
# QEMU is a verification oracle, never linked into shipped artifacts.
env:
OMEGA_SEED: ${{ runner.temp }}/baseline/baseline-omc
run: |
package=qemu-user-static_8.2.2+ds-0ubuntu1.19_amd64.deb
curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 \
"https://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/$package" \
--output "$RUNNER_TEMP/$package"
printf '%s %s\n' ec80ee896fe8f57f7420f4d4076164cb0fa613df6848568cdf5d1a2dbe2347cb "$RUNNER_TEMP/$package" | sha256sum --check --strict
mkdir -p "$RUNNER_TEMP/qemu"
dpkg-deb --fsys-tarfile "$RUNNER_TEMP/$package" | tar -x -C "$RUNNER_TEMP/qemu" \
./usr/bin/qemu-aarch64-static ./usr/lib/binfmt.d/qemu-aarch64.conf
printf '%s %s\n' 1152646a17920a81c618d62574ee8ae8b63243349957095d40212c2245f20aab "$RUNNER_TEMP/qemu/usr/bin/qemu-aarch64-static" | sha256sum --check --strict
interpreter="$RUNNER_TEMP/qemu/aarch64-binfmt-P"
ln -s "$RUNNER_TEMP/qemu/usr/bin/qemu-aarch64-static" "$interpreter"
"$RUNNER_TEMP/qemu/usr/bin/qemu-aarch64-static" --version
line=$(cat "$RUNNER_TEMP/qemu/usr/lib/binfmt.d/qemu-aarch64.conf")
packaged_interpreter=/usr/libexec/qemu-binfmt/aarch64-binfmt-P
line=${line/"$packaged_interpreter"/"$interpreter"}
printf '%s\n' "${line/:qemu-aarch64:/:cudapp-seed-aarch64:}" | sudo tee /proc/sys/fs/binfmt_misc/register
handler=/proc/sys/fs/binfmt_misc/cudapp-seed-aarch64
cat "$handler"
grep -Fx 'enabled' "$handler"
grep -Fx "interpreter $interpreter" "$handler"
grep -Fx 'flags: POF' "$handler"
grep -Fx 'offset 0' "$handler"
grep -Fx 'magic 7f454c460201010000000000000000000200b700' "$handler"
grep -Fx 'mask ffffffffffffff00fffffffffffffffffeffffff' "$handler"
printf '%s %s\n' 191b776ef98821597c3e30655da6d680a9b66edbc9ceaca3c39c61ea6df098e9 "$OMEGA_SEED" | sha256sum --check --strict
chmod +x "$OMEGA_SEED"
git clone -q https://github.com/aien-dev/omega-mv "$RUNNER_TEMP/omega-mv"
git -C "$RUNNER_TEMP/omega-mv" checkout -q e5b32567a7aff3ce594e3254a622a846a6cd190b
printf '%s %s\n' 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f "$RUNNER_TEMP/omega-mv/seed/out/omc" | sha256sum --check --strict
(cd "$RUNNER_TEMP/omega-bridge" && sh tools/build.sh)
{
echo "OMEGA_SEED=$OMEGA_SEED"
echo "OMEGA_OMC=$RUNNER_TEMP/omega-mv/seed/out/omc"
echo "OMEGA_MV=$RUNNER_TEMP/omega-mv"
echo "OMEGA_BRIDGE=$RUNNER_TEMP/omega-bridge"
echo "OMEGA_BRIDGE_DIR=$RUNNER_TEMP/omega-bridge"
} >> "$GITHUB_ENV"
- name: Native host build and tests (no GPU)
env:
OMEGA_BRIDGE: ${{ runner.temp }}/omega-bridge
run: |
make -j2 all
test "$(uname -m)" = x86_64
make build/test_codegen_hosted build/test_codegen_freestanding build/ampere-cubin/f16-host
for consumer in build/test_codegen_hosted build/test_codegen_freestanding build/ampere-cubin/f16-host; do
LC_ALL=C readelf -h "$consumer" | grep -F 'Advanced Micro Devices X86-64'
done
make test test-native-artifact zero-cuda-gate test-ampere-cubin-disasm
make OUT_DIR=build-ampere-oracle CUDAPP_AMPERE_CORPUS=1 test-ampere-encoder-oracle
- name: Remove only this run's ARM provenance handler
if: always()
run: |
handler=/proc/sys/fs/binfmt_misc/cudapp-seed-aarch64
if test -e "$handler"; then
printf '%s\n' -1 | sudo tee "$handler"
test ! -e "$handler"
fi
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge"
git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)"
git -C "$RUNNER_TEMP/omega-bridge" rev-parse HEAD
(cd "$RUNNER_TEMP/omega-bridge" && sh tools/bootstrap.sh && sh tools/build.sh)
- name: Host-only tests
# The runner's bash uses -e -o pipefail, so make's status is captured with `||`.
env:
Expand All @@ -64,7 +65,7 @@ jobs:
*) echo "make test exited 0 without the final CUDA++ HOST TESTS PASS line"; exit 1 ;;
esac
om-units:
# The committed Omega bindings (src/cudapp_om_units.c) regenerate byte for byte from the pinned omc and
# The committed portable Omega bindings (src/cudapp_om_*.c) regenerate byte for byte from the pinned omc and
# omega-bridge, and every mutant .om unit goes red. omega-mv e5b32567 carries the pinned seed/out/omc.
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
Expand All @@ -78,6 +79,7 @@ jobs:
git -C "$RUNNER_TEMP/omega-mv" checkout -q e5b32567a7aff3ce594e3254a622a846a6cd190b
git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge"
git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)"
(cd "$RUNNER_TEMP/omega-bridge" && sh tools/bootstrap.sh && sh tools/build.sh)
- name: Pinned offline NVIDIA instruction oracle
run: |
package=cuda_nvdisasm-linux-sbsa-13.0.85-archive
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/host-x86.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# x86-64 host CI (issue #196). Runs the portable suite from docs/OMEGA_HOST_TESTS.md
# and builds the x86 freestanding link (mk/omega-gpu-engine.mk, CUDAPP_PORTABLE_DEFS
# on cudapp_binding_portable.o). Does not install nvdisasm, clone Omega, or open a GPU.
# and builds the x86 freestanding link (mk/omega-gpu-engine.mk) from the generated
# Omega units (src/cudapp_freest_*.c, om/units.sh) with no migration-pending C switch.
# Does not install nvdisasm, clone Omega, or open a GPU.
# The AArch64 host-tests job stays in ci.yml. make test-runtime-api's version bump
# stays in runtime-api.yml (#189). Further host gates for #90 belong in their own
# change, not in this file. GB10 chip tests stay NOT_RUN.
Expand Down Expand Up @@ -36,7 +37,12 @@ jobs:
make CC=gcc gpu-engine-freestanding > "$RUNNER_TEMP/freestanding.log" 2>&1 || rc=$?
cat "$RUNNER_TEMP/freestanding.log"
[ "$rc" -eq 0 ] || exit "$rc"
grep -F 'cudapp_binding_portable.o' "$RUNNER_TEMP/freestanding.log" | grep -F -- '-DCUDAPP_MIGRATION_PENDING_C_ENCODER' | grep -F -- '-DCUDAPP_MIGRATION_PENDING_C_CUBIN'
for u in revision epoch f16; do
grep -E "/cudapp_freest_$u\.o src/cudapp_freest_$u\.c\$" "$RUNNER_TEMP/freestanding.log"
done
if grep -F -- '-DCUDAPP_MIGRATION_PENDING_C_' "$RUNNER_TEMP/freestanding.log"; then
echo "freestanding link compiled a migration-pending C switch"; exit 1
fi
line=$(grep -E '^freestanding GPU link \([0-9]+ files\): only .*undefined$' "$RUNNER_TEMP/freestanding.log")
echo "$line"
- name: Portable host suite
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build/
build-enc-c/
build-enc-diff/
build-ampere-oracle/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ make hello-gpu # runs make doctor, then examples/he

## Cursor Cloud specific instructions

Cloud Agent VMs are x86_64. `make` decides the host from `uname -m` (Makefile L24-31): on x86_64 it sets `CC := gcc` unless `CC` came from the command line or the environment, links the portable binding `src/cudapp_binding_portable.c` instead of the seeded AArch64 units, compiles the C encoder and C cubin writer as the portable bodies, and makes the six target-only rows (`test-om-encoder`, `test-om-cubin`, `test-gpu-native-runtime`, `test-om-spec-encoder`, `test-portable-receipts`, `test-model-capacity`) exit 2. `gcc` is whatever `PATH` finds first; on these VMs `/usr/local/bin/gcc` and `/usr/local/bin/cc` are the aarch64 cross compiler, so the built binaries are aarch64 and run under qemu-user. qemu-user is registered against `/usr/aarch64-linux-gnu` at boot, and again by `/usr/local/bin/make` if that boot hook did not run. If a binary exits with `Exec format error`, run any `make` target once, then retry it. On AArch64 `CC` stays make's built-in `cc` and the seeded binding is linked.
Cloud Agent VMs are x86_64. `make` decides the host from `uname -m` (Makefile L24-31): on x86_64 it sets `CC := gcc` unless `CC` came from the command line or the environment, compiles the same checked portable C units emitted by `om/units.sh` (`src/cudapp_om_*.c`, `src/cudapp_freest_*.c`) that AArch64 compiles, and, unless `OMEGA_OMC` is given explicitly, makes the three rows that execute the pinned AArch64 omc (`test-om-spec-encoder`, `test-portable-receipts`, `test-model-capacity`) exit 2. `gcc` is whatever `PATH` finds first; on these VMs `/usr/local/bin/gcc` and `/usr/local/bin/cc` are the aarch64 cross compiler, so the built binaries are aarch64 and run under qemu-user. qemu-user is registered against `/usr/aarch64-linux-gnu` at boot, and again by `/usr/local/bin/make` if that boot hook did not run. If a binary exits with `Exec format error`, run any `make` target once, then retry it. On AArch64 `CC` stays make's built-in `cc` and the seeded binding is linked.

`make test` is the host suite. Judge the exit code and the last line, `CUDA++ HOST TESTS PASS (<count> targets)`. The log contains intentional `FAIL` lines. Under qemu it is slower than the arm64 CI runner. The attention simulator is one slow part. `test-codegen-freestanding` sweeps every 2^32 bf16 input; a 20 million iteration cast loop took 18 seconds here, so that sweep is on the order of an hour. `build/hello_gpu --sim` is the simulator hello world. `python3 tools/figures/make_figures.py --check` checks the README figures.

Expand Down
Loading
Loading