• Andrey Filippov's avatar
    CLAUDE: rung C1 - resident prepareLMA (assemble + serial normalize on-device) · 7db7cf60
    Andrey Filippov authored
    Design 3-A4i rung C1: the LMA measured inputs never leave the GPU.
    - pose_lma_assemble (grid over resident corr rows): peaks {dx,dy,str,e0x,
      e0y,l0,l1,valid} + packed corr indices -> per-tile y offsets, raw strength
      weights, eigen 2x2 transform (setEigenTransform math, float; identity when
      use_eigen==0) and the fx selection mask. Parameterized contract (counts,
      slot, shift, components, policy scalars) - CUAS specifics stay host policy.
    - pose_lma_prepare_norm + pose_lma_prepare_finish: SERIAL one-thread tails
      (sample normalize + pull rows; y+=fx, H diagonal in Java getWJtJlambda
      order, regularization weights, full-weight normalize + pure_weight) -
      serial by design so the Java/C++ float clones gate BIT-EXACT.
    - tp_proc_exec_pose_lma_prepare_resident: camera/pose/centers/policy H2D,
      assemble -> norm -> pose_fx_jacobian(current, NO readback) -> finish;
      D2H = 8-float compact result (+optional capture of y/weights/eigen for
      the one-shot oracle). Same scratch bookkeeping as the step so a following
      no-H2D step never regrows.
    - tp_proc_exec_pose_lma_resident_step: all-NULL weights/y/eigen = use the
      resident prepared buffers (skip H2D); mixed NULLs rejected.
    Gates: direct CUDA prepare 5120/159 BIT-EXACT vs serial float oracle
    (y/weights/eigen/selection/scalars all 0 mismatches); resident + 19-float +
    fx_jacobian NVRTC PASS; pose_corr bit-exact @tol 0; compute-sanitizer 0
    errors on both binaries.
    Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
    7db7cf60
test_pose_lma_step.cu 20.6 KB