Skip to content

Investigate making the gather examples parallel #11

Description

@fabianlim

Summary

The gather fixture has 22 parallel: False variants, all skipping
test_work_distribution. Every other fixture (matmul, softmax,
vector_add) always uses tl.program_id and never needs this flag.
The parallel flag only exists in gather because gather_kernel was
written as a single-program kernel — an inconsistency that should be
resolved.

Goal

Make the gather fixture consistent with every other fixture: all
kernels use tl.program_id, all variants run test_work_distribution,
and the parallel flag goes away entirely.

This requires deciding for each kernel whether:

  1. It should be rewritten to use tl.program_id (preferred — matches
    all other fixtures), or
  2. It genuinely tests a single-program lowering that has no parallel
    equivalent, in which case the skip is legitimate and the variant
    should be removed or kept with a clear justification.

Questions to answer

  • Does gather_kernel (the original single-program kernel) still serve
    a purpose distinct from gather_2d_kernel, or can its variants be
    replaced by parallel equivalents?
  • Do the *_serial variants (2d_serial, 2d_large_table_serial)
    test anything not already covered by their parallel twins?

Acceptance

  • No parallel: False entries remain in fixtures/gather/meta.py, or
    each remaining one has an explicit justification and a decision was
    made not to remove it.
  • test_work_distribution skip count drops to zero for gather variants.
  • test_numerical still green for all variants.

Pointers

  • third_party/spyre/test/fixtures/gather/kernel.py
  • third_party/spyre/test/fixtures/gather/meta.py
  • third_party/spyre/test/test_ktir_examples.py — skip site (line 307)

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions