Repository navigation
Conversation
…e graphs, shared buffers, CTC/logits variants, batched CTC units with GPU/CPU overlap, permanent CPU fallback); OcrSessionFactory backend rules restored
…ench/AndroidBench
…nfig); CI ns2.0 leg builds the engine from source; README engine notes
… CTC head consumed on the thread pool in growing batches while the device runs later units, 96 cached execs; onReady exceptions propagate
…GPU re-created; permanent fallback after 3), one stderr line per fallback; opt-in device-loss test
…recorded submission (SimdOnnx VkUnitRunner, growing waves) instead of a per-shape session + submit/wait per unit; unit output shapes from the compiled graph Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ared pool), no full-output graph warmed by the batched path, unit outputs sliced by their exact length Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SimdOnnx) until the engine ships on nuget.org Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e MatMul / ArgMax kernels (moved to the engine with their tests); GPU sessions share the model's projection instead of copying its weights per session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(the CI smoke checks it engaged); the smoke also fails on the "Metal failed ... falling back" line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s and packs against the pinned package (what ships: the nupkg now depends on exactly [0.1.0-preview.4]) and keeps one job on sdcb/SimdOnnx main from source; NU5104 accepted while the engine is a preview Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, as the pre-engine backend did (CompileOptions.Vec4Eltwise; needs the next Sdcb.SimdOnnx preview) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alize go through ImageTensor.ResizeLinear (the same OpenCV-exact INTER_LINEAR arithmetic and tables, bit-identical on 480 random cases x 4 formats x both layouts x AVX2 / Vector / scalar); PixelRow kernels moved to the engine, ResizeWorkspace removed (scratch comes from ArrayPool). Vulkan 4w vs the previous build: det_preprocess 3.2 -> 1.5 ms, rec_preprocess 2.9 -> 1.4 ms (tiny), e2e tiny 0.89x / small 0.96x; CPU unchanged; exact lines identical. Needs the next Sdcb.SimdOnnx preview Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, Metal batch fix); bench ns2.0 build in package mode takes the package's netstandard2.0 engine (it failed with CS7069 IsExternalInit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switches the inference engine to the shared Sdcb.SimdOnnx (pinned
0.1.0-preview.3, ProGet test feed). The OCR pipeline, public API, preprocessing, CTC head and post-processing stay in this repo; the engine-internal parts move to SimdOnnx: the ONNX interpreter, kernels, the Vulkan/Metal backends and their tests and benches.Draft. CPU meets the "not slower" bar. Vulkan is now within a few percent of the old backend (noisy, see below).
Performance (interleaved A/B, same machine: Ryzen 9 5950X + Arc B580)
Median ms per image over the 100-image dataset. A ratio below 1 means faster. Stage columns are old/new means.
Script:
SimdOnnx/tools/ab-paddle.ps1. Absolute speed on this machine drifted by up to 35% between sessions, so compare only within this table. The Vulkan rows are from the last of five interleaved runs. The other four gave ratios of 1.14–1.35 (tiny), 1.09–1.43 (small) and 0.97–1.07 (medium). Stage means are at parity; what remains is per-new-shape setup (plan compile + graph + session).What closed the Vulkan gap (details in SimdOnnx
docs/perf.md):Reshape/ReshapeMany, and the CTC head runs on the thread pool in batches while the GPU continues.Device loss now recovers: the failing call finishes on the CPU and the next call gets a fresh device. Fallback is permanent only after 3 losses. Each fallback logs one stderr line.
Breaking / behaviour changes
OnnxSharp.InferenceSession, the in-repo kernels andBackends.*are gone. They were internal;ModelandCompiledModelare kept as thin adapters.test/Sdcb.SimdPaddleOCR.GpuBenchis removed. Removed from the AndroidBench GPU probes: caps, gemm, layers, prof, cmp. Removed engine kernel tests:NhwcKernelTests, the conv/erf/gelu parts ofKernelCorrectnessTests,GpuSessionShapeTestsandInferenceSessionRunContractTests. Equivalent coverage lives in SimdOnnx.Before merge (TODO)
simdonnx-previewsource fromnuget.config, and bump the pin.vkQueueSubmithappened while VS Code was updating, and could not be reproduced. See SimdOnnxdocs/decisions.md.Unit tests: 76/76 on net10 (and on the ns2.0 library via the local engine).