Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f5ca45e
docs(acceleration): 三域归流,自动择径 · unify platform Auto acceleration cont…
eric8810 Jul 17, 2026
62cf7ca
feat(webgpu): 霜锁源流,曙光铸契 · freeze Linux WebGPU runtime contract
eric8810 Jul 17, 2026
aa56eeb
feat(runtime): 云路择流,契印固舱 · add provider selection and runtime contracts
eric8810 Jul 18, 2026
d913274
fix(runtime): 契印归真,四域复明 · restore runtime gates
eric8810 Jul 18, 2026
0f25db4
feat(webgpu): 星桥贯双境,光算入原生 · complete native WebGPU integration
eric8810 Jul 18, 2026
3687373
fix(webgpu): 双流辨器,明定载参 · disambiguate plugin EP options
eric8810 Jul 18, 2026
04c779d
fix(webgpu): 无卡先辨,静验归核 · isolate headless contract tests
eric8810 Jul 18, 2026
660f2ab
test(webgpu): 三启验寒锋,实证锁真源 · harden device qualification evidence
eric8810 Jul 18, 2026
aa2bf83
feat(webgpu): 双卷合璧,验印待裁 · add paired qualification report review
eric8810 Jul 18, 2026
74e3e3d
test(webgpu): 龙吟初试,光核已证 · submit Linux x64 FP32 qualification report
eric8810 Jul 19, 2026
cb6f149
feat(webgpu): 半晶入卷,双境启光 · enable native FP16
eric8810 Jul 19, 2026
6c79015
test(webgpu): 旧卷归尘,新章待启 · remove stale FP32-only report before FP16 r…
eric8810 Jul 19, 2026
66f31fb
test(webgpu): 半晶入卷,双境启光 · submit Linux x64 FP16+FP32 qualification re…
eric8810 Jul 19, 2026
17d6efd
refactor(webgpu): 浮光去半,独守三十二 · remove FP16 from non-Mac qualification…
eric8810 Jul 19, 2026
6efea59
fix(webgpu): 双错皆纳,严关不纵 · accept both strict rejection error patterns
eric8810 Jul 19, 2026
46d52e5
fix(webgpu): 锁卷凝纹一字平 · force LF SHA256SUMS in WebGPU bundle packaging
Jul 19, 2026
6d5b155
test(webgpu): 龙吟再试,百关尽渡 · submit final Linux x64 FP32 qualification r…
eric8810 Jul 19, 2026
2e88c57
test(webgpu): 霜刃初试双境,光核留痕未圆 · submit Windows x64 real-device qualific…
Jul 19, 2026
61c108f
fix(webgpu): 暖刃已磨,量准方休 · warmup-aware lifecycle gate for WebGPU quali…
Jul 19, 2026
202c7b2
test(webgpu): 双境齐光,百关尽渡 · submit Windows x64 real-device qualificatio…
Jul 19, 2026
aa803ab
fix(webgpu): 锋转随器,任匠开工 · allow Ninja generator override for Windows q…
Jul 19, 2026
79c6087
feat(webgpu): 双境归一,光速入卷 · finalize 0.3.0 candidate
eric8810 Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 9 additions & 5 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ jobs:
- id: macos-arm64
runner: macos-15
executable_suffix: ""
binary_dir: build-ci/bin
- id: macos-x64
runner: macos-15-intel
executable_suffix: ""
binary_dir: build-ci/bin
- id: windows-x64
runner: windows-2022
executable_suffix: ".exe"
binary_dir: build-ci/bin/Release
- id: linux-x64
runner: ubuntu-24.04
executable_suffix: ""
binary_dir: build-ci/bin
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Expand All @@ -59,7 +63,7 @@ jobs:
shell: bash
run: >-
python tools/run_offline_check.py
--validate build-ci/bin/light_ocr_validate${{ matrix.executable_suffix }}
--validate ${{ matrix.binary_dir }}/light_ocr_validate${{ matrix.executable_suffix }}
--bundle models/generated/ppocrv6-small-onnx-20260714.2
--fixture corpus/fixtures/generated-hello-123/fixture.json
- name: Runtime check with the network namespace disabled
Expand All @@ -75,7 +79,7 @@ jobs:
- name: Repeated lifecycle RSS gate
shell: bash
run: >-
./build-ci/bin/light_ocr_leak_check${{ matrix.executable_suffix }}
./${{ matrix.binary_dir }}/light_ocr_leak_check${{ matrix.executable_suffix }}
--bundle models/generated/ppocrv6-small-onnx-20260714.2
--pixels corpus/fixtures/generated-hello-123/pixels.bin
--width 800 --height 180 --stride 2400 --format bgr8
Expand All @@ -88,9 +92,9 @@ jobs:
with:
name: light-ocr-core-${{ matrix.id }}
path: |
build-ci/bin/light_ocr_*
build-ci/bin/onnxruntime*
build-ci/bin/libonnxruntime*
${{ matrix.binary_dir }}/light_ocr_*
${{ matrix.binary_dir }}/onnxruntime*
${{ matrix.binary_dir }}/libonnxruntime*
build-ci/**/light_ocr_core.lib
build-ci/**/liblight_ocr_core.a
reports/release/${{ matrix.id }}
Expand Down
33 changes: 30 additions & 3 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
python tools/npm_release.py stage-native \
--platform-id "${{ matrix.id }}" \
--build-dir build-npm \
--configuration Release \
--metadata-dir "reports/npm/${{ matrix.id }}" \
--output-dir "dist/native-input/${{ matrix.id }}"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
Expand All @@ -183,6 +184,31 @@ jobs:
if-no-files-found: error
retention-days: 90

reproduce-webgpu-models:
needs: validate
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- name: Install the hash-locked WebGPU model toolchain
run: python -m pip install --require-hashes -r tools/webgpu/requirements.lock
- name: Reproduce and verify the deterministic WebGPU models
shell: bash
run: |
python tools/bootstrap_models.py --cache-dir .cache/models
python tools/package_model_bundle.py
python tools/webgpu/convert_models.py \
--output .cache/reproduced/webgpu-fp16-20260719.1
cmp models/derived/webgpu-fp16-20260719.1/det/inference.onnx \
.cache/reproduced/webgpu-fp16-20260719.1/det/inference.onnx
cmp models/derived/webgpu-fp16-20260719.1/rec/inference.onnx \
.cache/reproduced/webgpu-fp16-20260719.1/rec/inference.onnx
cmp models/derived/webgpu-fp16-20260719.1/provenance.json \
.cache/reproduced/webgpu-fp16-20260719.1/provenance.json

derive-apple-models:
needs: validate
runs-on: macos-15
Expand All @@ -208,7 +234,7 @@ jobs:
retention-days: 30

assemble:
needs: [build-native, derive-apple-models]
needs: [build-native, reproduce-webgpu-models, derive-apple-models]
runs-on: ubuntu-24.04
env:
RELEASE_VERSION: ${{ inputs.version }}
Expand All @@ -228,19 +254,20 @@ jobs:
with:
name: npm-apple-fp16-models
path: models/generated/apple-fp16-20260715.1
- name: Bootstrap and package the self-contained Apple model bundle
- name: Bootstrap and package the self-contained native model bundle
shell: bash
run: |
python tools/bootstrap_models.py --cache-dir .cache/models
python tools/package_model_bundle.py
python tools/webgpu/package_bundle.py
python tools/apple/package_bundle.py \
--qualification-report contracts/apple-provider-baselines.json
- name: Assemble and deterministically pack six packages
shell: bash
run: |
python tools/npm_release.py assemble \
--version "$RELEASE_VERSION" \
--bundle models/generated/ppocrv6-small-apple-20260715.1 \
--bundle models/generated/ppocrv6-small-native-20260719.1 \
--native-root dist/native-input \
--output-dir dist/npm/staging
python tools/npm_release.py pack \
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/tiled-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,23 @@ jobs:
- id: macos-arm64
runner: macos-15
executable_suffix: ""
binary_dir: build-qualification/bin
node_runtime_dir: build-qualification/node-runtime
- id: macos-x64
runner: macos-15-intel
executable_suffix: ""
binary_dir: build-qualification/bin
node_runtime_dir: build-qualification/node-runtime
- id: linux-x64
runner: ubuntu-24.04
executable_suffix: ""
binary_dir: build-qualification/bin
node_runtime_dir: build-qualification/node-runtime
- id: windows-x64
runner: windows-2022
executable_suffix: ".exe"
binary_dir: build-qualification/bin/Release
node_runtime_dir: build-qualification/node-runtime/Release
runs-on: ${{ matrix.runner }}
timeout-minutes: 180
steps:
Expand Down Expand Up @@ -123,8 +131,9 @@ jobs:
bundle="$PWD/models/generated/ppocrv6-small-onnx-20260714.2"
root="$PWD/reports/qualification/${{ matrix.id }}"
executable="${{ matrix.executable_suffix }}"
binary_dir="${{ matrix.binary_dir }}"
fixture_root="$PWD/corpus/tiled-v1/fixtures"
./build-qualification/bin/light_ocr_leak_check${executable} \
./${binary_dir}/light_ocr_leak_check${executable} \
--bundle "$bundle" \
--pixels "$fixture_root/tiled-four-way-intersection-2048/pixels.bin" \
--width 2048 --height 2048 --stride 6144 --format bgr8 \
Expand All @@ -136,14 +145,14 @@ jobs:
tiled-four-way-intersection-2048
do
python oracle/run_tiled_benchmark.py \
--native-benchmark "build-qualification/bin/light_ocr_benchmark${executable}" \
--native-benchmark "${binary_dir}/light_ocr_benchmark${executable}" \
--bundle "$bundle" \
--fixture "$fixture_root/$fixture/fixture.json" \
--platform-id "${{ matrix.id }}" \
--build-metadata "$root/build-manifest.json" \
--report "$root/core/$fixture.json"
for diagnostics in on off; do
./build-qualification/bin/light_ocr_memory_gate${executable} \
./${binary_dir}/light_ocr_memory_gate${executable} \
--bundle "$bundle" \
--pixels "$fixture_root/$fixture/pixels.bin" \
--width 2048 --height 2048 --stride 6144 --format bgr8 \
Expand All @@ -156,7 +165,8 @@ jobs:
- name: Capture Node 22 latency and peak reports
shell: bash
env:
LIGHT_OCR_NODE_BINARY: ${{ github.workspace }}/build-qualification/bin/light_ocr_node.node
LIGHT_OCR_NODE_BINARY: ${{ github.workspace }}/${{ matrix.node_runtime_dir }}/native/light_ocr_node.node
LIGHT_OCR_RUNTIME_DESCRIPTOR: ${{ github.workspace }}/${{ matrix.node_runtime_dir }}/native/runtime-descriptor.json
LIGHT_OCR_MODEL_BUNDLE: ${{ github.workspace }}/models/generated/ppocrv6-small-onnx-20260714.2
run: |
set -euo pipefail
Expand All @@ -182,7 +192,8 @@ jobs:
- name: Capture Node 24 latency and peak reports
shell: bash
env:
LIGHT_OCR_NODE_BINARY: ${{ github.workspace }}/build-qualification/bin/light_ocr_node.node
LIGHT_OCR_NODE_BINARY: ${{ github.workspace }}/${{ matrix.node_runtime_dir }}/native/light_ocr_node.node
LIGHT_OCR_RUNTIME_DESCRIPTOR: ${{ github.workspace }}/${{ matrix.node_runtime_dir }}/native/runtime-descriptor.json
LIGHT_OCR_MODEL_BUNDLE: ${{ github.workspace }}/models/generated/ppocrv6-small-onnx-20260714.2
run: |
set -euo pipefail
Expand Down
185 changes: 185 additions & 0 deletions .github/workflows/webgpu-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: native webgpu

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: native-webgpu-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
contract:
name: ${{ matrix.id }} contract
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- id: linux-x64
runner: ubuntu-24.04
node_runtime: build-webgpu/node-runtime/native
- id: windows-x64
runner: windows-2022
node_runtime: build-webgpu/node-runtime/Release/native
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "22"
- name: Validate contract unit tests
run: >-
python -m unittest
tests.python.test_webgpu_runtime
tests.python.test_webgpu_models
tests.python.test_npm_release
tests.python.test_webgpu_qualification
tests.python.test_webgpu_report_review
- name: Validate the checked-in real-device report pair
if: matrix.id == 'linux-x64'
shell: bash
run: >-
python tools/webgpu/review_reports.py
--reports-root reports/webgpu-qualification
--output "$RUNNER_TEMP/webgpu-review-candidate.json"
- name: Bootstrap common dependencies and model
shell: bash
run: |
python tools/bootstrap_dependencies.py --cache-dir .cache/dependencies
python tools/bootstrap_dependencies.py --cache-dir .cache/dependencies --offline
python tools/bootstrap_models.py --cache-dir .cache/models
python tools/package_model_bundle.py
python tools/webgpu/package_bundle.py
- name: Reproduce the locked internal FP16 derivations (Linux)
if: runner.os != 'Windows'
shell: bash
run: |
python -m pip install --require-hashes -r tools/webgpu/requirements.lock
python tools/webgpu/convert_models.py \
--output .cache/reproduced/webgpu-fp16-20260719.1
cmp models/derived/webgpu-fp16-20260719.1/det/inference.onnx \
.cache/reproduced/webgpu-fp16-20260719.1/det/inference.onnx
cmp models/derived/webgpu-fp16-20260719.1/rec/inference.onnx \
.cache/reproduced/webgpu-fp16-20260719.1/rec/inference.onnx
cmp models/derived/webgpu-fp16-20260719.1/provenance.json \
.cache/reproduced/webgpu-fp16-20260719.1/provenance.json
- name: Assemble and revalidate the locked SDK
shell: bash
run: |
python tools/webgpu/build_runtime.py \
--platform "${{ matrix.id }}" \
--package-cache .cache/webgpu-packages \
--output-dir "dist/webgpu-sdk/${{ matrix.id }}"
python tools/webgpu/build_runtime.py \
--validate-sdk "dist/webgpu-sdk/${{ matrix.id }}"
python tools/webgpu/build_runtime.py \
--platform "${{ matrix.id }}" \
--offline \
--package-cache .cache/webgpu-packages \
--output-dir "dist/webgpu-sdk-offline/${{ matrix.id }}"
- name: Install Node development files (Linux)
if: runner.os != 'Windows'
shell: bash
run: |
node_version="$(node -p process.versions.node)"
npx --yes node-gyp@11.4.2 install "$node_version" --devdir "$PWD/.cache/node-gyp"
node_root="$PWD/.cache/node-gyp/$node_version"
test -f "$node_root/include/node/node_api.h"
echo "NODE_INCLUDE_DIR=$node_root/include/node" >> "$GITHUB_ENV"
- name: Install Node development files (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$nodeVersion = node -p process.versions.node
$devDir = Join-Path $env:GITHUB_WORKSPACE ".cache/node-gyp"
npx --yes node-gyp@11.4.2 install $nodeVersion --devdir $devDir
$nodeRoot = Join-Path $devDir $nodeVersion
$headers = Join-Path $nodeRoot "include/node"
$library = Get-ChildItem $nodeRoot -Recurse -Filter node.lib | Select-Object -First 1
if (-not (Test-Path (Join-Path $headers "node_api.h")) -or $null -eq $library) {
throw "Verified Node development files are incomplete"
}
"NODE_INCLUDE_DIR=$headers" | Out-File -FilePath $env:GITHUB_ENV -Append
"NODE_LIBRARY=$($library.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Configure WebGPU qualification build (Linux)
if: runner.os != 'Windows'
shell: bash
run: >-
cmake -S . -B build-webgpu -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DLIGHT_OCR_DEPENDENCY_CACHE_DIR="$PWD/.cache/dependencies"
-DLIGHT_OCR_ONNXRUNTIME_FLAVOR=webgpu
-DLIGHT_OCR_WEBGPU_SDK_DIR="$PWD/dist/webgpu-sdk/${{ matrix.id }}"
-DLIGHT_OCR_WEBGPU_QUALIFICATION_BUILD=ON
-DLIGHT_OCR_BUILD_NODE=ON
-DLIGHT_OCR_BUILD_TESTS=ON
-DLIGHT_OCR_BUILD_TOOLS=ON
-DLIGHT_OCR_NODE_INCLUDE_DIR="$NODE_INCLUDE_DIR"
-DLIGHT_OCR_NODE_EXECUTABLE="$(command -v node)"
- name: Configure WebGPU qualification build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: >-
cmake -S . -B build-webgpu -G "Visual Studio 17 2022" -A x64
"-DLIGHT_OCR_DEPENDENCY_CACHE_DIR=$env:GITHUB_WORKSPACE/.cache/dependencies"
-DLIGHT_OCR_ONNXRUNTIME_FLAVOR=webgpu
"-DLIGHT_OCR_WEBGPU_SDK_DIR=$env:GITHUB_WORKSPACE/dist/webgpu-sdk/${{ matrix.id }}"
-DLIGHT_OCR_WEBGPU_QUALIFICATION_BUILD=ON
-DLIGHT_OCR_BUILD_NODE=ON
-DLIGHT_OCR_BUILD_TESTS=ON
-DLIGHT_OCR_BUILD_TOOLS=ON
"-DLIGHT_OCR_NODE_INCLUDE_DIR=$env:NODE_INCLUDE_DIR"
"-DLIGHT_OCR_NODE_LIBRARY=$env:NODE_LIBRARY"
"-DLIGHT_OCR_NODE_EXECUTABLE=$((Get-Command node).Source)"
- name: Compile, link, and run hardware-independent tests
shell: bash
run: |
cmake --build build-webgpu --config Release --parallel
ctest --test-dir build-webgpu -C Release --output-on-failure -LE node
- name: Verify the staged addon and descriptor from a sterile directory
shell: bash
env:
LIGHT_OCR_NODE_BINARY: ${{ github.workspace }}/${{ matrix.node_runtime }}/light_ocr_node.node
LIGHT_OCR_RUNTIME_DESCRIPTOR: ${{ github.workspace }}/${{ matrix.node_runtime }}/runtime-descriptor.json
run: |
sterile="$(mktemp -d)"
cd "$sterile"
node -e "const x=require(process.env.GITHUB_WORKSPACE+'/bindings/node/js/load-native.cjs').loadNative(); console.log(JSON.stringify(x.binding.runtimeContract))"
- name: Generate license, SBOM, and native package input
shell: bash
run: |
python tools/generate_release_metadata.py \
--build-dir build-webgpu \
--configuration Release \
--platform-id "${{ matrix.id }}" \
--output-dir "reports/webgpu/${{ matrix.id }}"
python tools/npm_release.py stage-native \
--platform-id "${{ matrix.id }}" \
--build-dir build-webgpu \
--configuration Release \
--metadata-dir "reports/webgpu/${{ matrix.id }}" \
--output-dir "dist/webgpu-native/${{ matrix.id }}" \
--runtime-flavor webgpu \
--webgpu-artifact-manifest "dist/webgpu-sdk/${{ matrix.id }}/artifact-manifest.json" \
--qualification-build
LIGHT_OCR_NODE_BINARY="$PWD/dist/webgpu-native/${{ matrix.id }}/native/light_ocr_node.node" \
LIGHT_OCR_RUNTIME_DESCRIPTOR="$PWD/dist/webgpu-native/${{ matrix.id }}/native/runtime-descriptor.json" \
node -e "const x=require('./bindings/node/js/load-native.cjs').loadNative(); console.log(JSON.stringify(x.runtimePolicy))"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: native-webgpu-${{ matrix.id }}
path: |
dist/webgpu-sdk/${{ matrix.id }}
dist/webgpu-native/${{ matrix.id }}
reports/webgpu/${{ matrix.id }}
if-no-files-found: error
retention-days: 30
Loading
Loading