# SPDX-License-Identifier: Apache-2.0 """CPU reference of FRNet (Autoware lidar_frnet) -- the ground truth every PCC / output-agreement gate compares against (PLAN.md 0.3 item 1). It runs where ttnn is absent (the research venv) and never imports ttnn. - ``config.py`` the Autoware parameters this port reproduces (``ml_package_frnet_.param.yaml`` of the weights, ``frnet.param.yaml`` node parameters) and the COMPILE constants, each with its source line; - ``weights.py`` the deployed ONNX read as data with the vendored ``ttaw.weights.OnnxWeights`` (initializers by consuming node; structure and every wiring assumption checked on the graph; BN folded in float64 into the point layers, ``pre_norm`` kept as the host's scale / shift) -- the loader the TT port uses too; - ``model.py`` fp32 torch rebuild of the deployed graph with per-module taps (``ttaw.golden.TapRegistry``; names in ``weights.MODULE_TAPS`` / ``OPT_IN_TAPS``), ported from research/frnet/scripts/frnet_torch_ref.py; - ``rewrites.py`` the TT device dataflow (sorted + padded points, gather-form scatters with a zero sentinel row, the exact log-step segmented max, K-split convs and point layers, interpolation-matrix up-sampling) proven equal to ``model.py`` on the CPU, and a first-order precision emulation; - ``ort.py`` ONNX Runtime golden of the deployed ONNX with matching intermediates (research / tests only: onnxruntime is not in the image); - ``pipeline.py`` the reference end to end: ``host/`` pre-processing -> torch / ORT / plan network -> ``host/`` post-processing -> ``FRNetSegmentation``. Pre- and post-processing are not duplicated here: they live in ``tt_frnet.host`` (shared with the device path, so TT and CPU see identical network inputs) and are tested against the research scripts. The reduced ``to_dict()`` of the ORT reference on a sample is stored per variant next to it as ``samples/synthetic_..reference.json``: ``server/smoke_test.py`` compares the served output with it. """