Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/tree/main/examples/deepinfer # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / examples / deepinfer` `4ad48c4` native x86: opt-in native execution mode, physical runbook and receipt format (DRA-104) (#60) aien-spark committed 2026-11-05 ``` .. callers/ .crumb 1191 NOTICE 678 README.md 2311 boundary.txt 1193 diff.cpp 10640 diff.py 5917 flops_estimator-omega.patch 2852 flops_pairs.om 1684 overflow.sh 2542 patched.cpp 6655 run.sh 11711 ``` README.md # DeepInfer FlopsEstimator pair counts in Omega `flops_pairs.om` is `FlopsEstimator::floor_prefix`, `capped_prefix` and `pairs` from deepseek-ai/DeepInfer `553741557a57df44a46fb3ab72b6aafeaf945337` `csrc/engine/flops_estimator.hpp` lines 237-257 (Apache-2.0), as an OM-2 unit bound by `tools/native` into `omega2_floor_prefix`, `omega2_capped_prefix` and `omega2_pairs`. - Each step is the C++ expression's step in the same order, so a step that leaves `long` traps 1 exactly where the C++ is undefined behaviour (the pinned compilers trap on long add, sub and mul: `overflow.sh`, `evidence/deepinfer-flops-pairs/overflow-measurement.log`). - Outside n >= 0, ratio > 0, cap >= 0, 0 <= begin <= end a `requires` clause traps 9. OM-2 is used because the pinned compilers do not check an OM-1 `requires` (same log). - The C++ parameter `end` is `finish`: `end` is an Omega keyword (error 16). Files: File Role `flops_pairs.om` the unit `diff.cpp` upstream bytes (extracted, sha256-checked, GCC UBSan) vs Omega vs enumeration / step model / second closed form `diff.py` the generated Python binding vs Python oracles `boundary.txt` overflow and domain edges with Wolfram-checked values `flops_estimator-omega.patch` the pinned header with the three bodies calling `omega_native.h`; a trap becomes `TORCH_CHECK` `patched.cpp` original vs patched header on `PairTerm::count` and `query_ranges`, stub `TORCH_CHECK` `callers/` c (also BTI-enforced), cpp, python, rust, zig and go callers using only the generated bindings `run.sh` everything above plus three mutants that must be caught `overflow.sh` long overflow, `requires` and `end` probes per compiler Run (host only, no GPU): ``` DEEPINFER_SRC= OMEGA_NATIVE_OMC= \ OMEGA_NATIVE_OMC2= [TORCH_INC=] sh examples/deepinfer/run.sh ``` Applying the patch to DeepInfer also needs `omega_native.h` on its include path and `libomega_native.so` linked into `deepinfer._C`; that build and the upstream pytest `tests/engine/test_flops_estimator.py` (needs the model config) were not run. Evidence: `evidence/deepinfer-flops-pairs/`.