interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / examples / deepinfer / README.md

39 lines · 2311 bytes Raw Blame History Source

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.

Files:

FileRole
flops_pairs.omthe unit
diff.cppupstream bytes (extracted, sha256-checked, GCC UBSan) vs Omega vs enumeration / step model / second closed form
diff.pythe generated Python binding vs Python oracles
boundary.txtoverflow and domain edges with Wolfram-checked values
flops_estimator-omega.patchthe pinned header with the three bodies calling omega_native.h; a trap becomes TORCH_CHECK
patched.cpporiginal 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.sheverything above plus three mutants that must be caught
overflow.shlong overflow, requires and end probes per compiler

Run (host only, no GPU):

DEEPINFER_SRC=<DeepInfer checkout at 5537415> OMEGA_NATIVE_OMC=<seeded omc pinned by tools/native> \
OMEGA_NATIVE_OMC2=<omega-mv e5b32567 seed/out/omc> [TORCH_INC=<torch/include>] 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/.