Skip to content

test(hpc/activations): F→C symmetric companion to sigmoid_f32 stride-order test#164

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/sigmoid-f-order-test
May 19, 2026
Merged

test(hpc/activations): F→C symmetric companion to sigmoid_f32 stride-order test#164
AdaWorldAPI merged 1 commit into
masterfrom
claude/sigmoid-f-order-test

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Cherry-picks the +37-line additive F-order test from claude/sigmoid-stride-order-fix-MAOO0-v2 (0774bdb), drops the rest. Adds the F-in / C-out symmetric counterpart to the existing test_sigmoid_f32_c_in_f_out_mismatched_strides coverage.

If a future refactor accidentally guards only the asymmetric case (e.g. if x.is_standard_layout() != out.is_standard_layout()), the existing C→F test would still pass while F→C silently regressed. Both directions now pin the strides-equality guard symmetrically.

Why cherry-pick instead of opening the original branch

claude/sigmoid-stride-order-fix-MAOO0-v2 is a destructive rebase pre-dating all of Phase-2 substrate work: +52 / −26,900 lines across 92 files. It would delete the .claude/knowledge/ substrate set (GridLake, X14′, canary, hhtl-* prompts, pr-x* designs, consolidation doc), the entire src/hpc/linalg/* module set, the entire src/hpc/pillar/* module set, and the entire src/hpc/ogit_bridge/* module + assets.

Only the +37 additive lines in src/hpc/activations.rs are safe to land. That's what this PR contains. The destructive-rebase branch should be closed without merging.

Test plan

  • cargo check --tests --lib clean on master tip 25bcafb9
  • cargo test --lib hpc::activations → 18/18 pass, including both:
    • test_sigmoid_f32_c_in_f_out_mismatched_strides (existing)
    • test_sigmoid_f32_f_in_c_out_mismatched_strides (new in this PR)
  • Additive only — no source-of-truth code changed, no docs changed, no Cargo.toml changed
  • Per AdaWorldAPI additive-only directive: JC ndarray-side checks remain in ndarray; lance-graph jc copies untouched; no deletions anywhere

Generated by Claude Code

…gmoid_f32

Adds the F-in / C-out direction to the existing
test_sigmoid_f32_c_in_f_out_mismatched_strides coverage. If a future
refactor accidentally guards only the asymmetric case (e.g.
`if x.is_standard_layout() != out.is_standard_layout()`), the existing
C→F test would still pass while F→C silently regressed.

Both directions now pin the strides-equality guard symmetrically.

Cherry-picked from claude/sigmoid-stride-order-fix-MAOO0-v2 (0774bdb) —
the rest of that branch is a destructive rebase pre-dating Phase-2 substrate
work and is not safe to land as a PR. Only the +37-line additive test
makes it into this branch.

Verified: 18/18 hpc::activations tests pass on master tip 25bcafb
(includes both test_sigmoid_f32_c_in_f_out_mismatched_strides and the
new test_sigmoid_f32_f_in_c_out_mismatched_strides).
@AdaWorldAPI AdaWorldAPI merged commit 13dfcf9 into master May 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants