Skip to content

Conversation

@jafioti
Copy link
Collaborator

@jafioti jafioti commented Dec 28, 2025

Motivation

  • Reduce duplication by grouping closely related test cases for unary/binary ops, cumulative ops, reductions, and shape tracking.
  • Ensure multi-variant behaviors (broadcasting, multi-axis reductions, and cumops along non-last axes) are validated in existing test harnesses.
  • Keep test code easier to maintain by folding small scattered checks into existing tests.
  • Add a targeted movement test for gather and inverse_permutation to cover those operators.

Description

  • Merged softmax axis-1 and cumulative-op variants into existing unary tests and added reference implementations cumsum_ref_2d, cummax_ref_2d, and cumprod_ref_2d in src/hl_ops/unary.rs and moved their checks into test_softmax/test_cumsum.
  • Added broadcasting variants to test_add and test_mul in src/hl_ops/binary.rs to cover more broadcast shapes.
  • Folded expand/squeeze checks into the test_unsqueeze movement test and added a new test_gather_and_inverse_permutation in src/hl_ops/movement.rs.
  • Consolidated multi-axis reduction checks into existing test_sum and test_mean, and kept test_prod in src/hl_ops/reduction.rs.
  • Combined symbolic simplification/substitution checks into a single test in src/shape/symbolic.rs and merged the shape-tracker expand/broadcast checks into test_permute_and_expand in src/shape/tracker.rs.

Testing

  • Ran cargo fmt successfully to format the changes.
  • No automated unit tests were executed as part of this change (cargo test was not run).

Codex Task

@jafioti jafioti merged commit 8b0fafe into main Dec 28, 2025
3 of 5 checks passed
@jafioti jafioti deleted the codex/identify-areas-for-improved-test-coverage branch December 28, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants