Skip to content

gather fixtures structure and extension to match A-D level pattern #166

Description

@lasch

A-D levels for test fixtures already exist for e.g. reduce.
As a follow-up to #11 and #116 the same pattern should be established for gather.

The table below shows the current status/gaps:

Level Existing variants (30 total, 14 kernel fns) Fit
A — shape/distribution default, y_offset_zero, full_row, slice_large_row, min_block_cols, slice_at_end, wide_slice (gather_kernel, 7); 1core, large_k (gather_kernel_1core, 2); 2d, 2d_serial, 2d_large_table, 2d_large_table_serial (gather_2d_kernel, 4); 1d (gather_1d_kernel, 1); 3d, 3d_large_k, 3d_group, 3d_group_end, 3d_partial, scatter_3d, scatter_3d_partial, 4d, 4d_boundary, 2d_index_gather, 2d_index_roundtrip, 2d_index_3d_block, 2d_index_3d_block_large (9 kernel fns, 14 variants) Good fit, already exists. All 28 pin fp32/i32 and sweep rank, shape, grid, and distribution — exactly Level A's job. No new variants needed; this is a reclassification, not a rewrite.
B — compute correctness (none) Gap. No variant sweeps dtype at the simplest shape on ktir_cpu alone — the closest thing today (1core) is fp32-only and already carries other Level-A-ish framing (single-program shape, not a dtype probe).
C — layout spyre_stick, spyre_stick_output_only (gather_kernel_spyre, 2); 4d_spyre_stick_output (part of gather_4d_kernel's 3) Good fit, already exists. All three carry tl.spyre_tensor_layout annotations, no compiles_to_binary, matching Level C exactly.
D — device (none) Gap. grep -n "compiles_to_binary" fixtures/gather/meta.py returns nothing — no gather variant reaches dbo-opt or compiles to a real binary today. A and C are largely already there in substance if not in labeling.

The implementation is probably going to be done in at least 2 stages:

  1. update/rename existing tests/fixtures to match the pattern (this is a rather straightforward/cheap step)
  2. fill in the gaps with new fixtures (this might be split into further sub-steps depending on required effort)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions