Skip to content

index_2d_runtime still carries an unsafe launch-uniformity obligation #516

Closed

Description

@alejandro-soto-franco

thread::index_2d_runtime takes a runtime row stride and is unsafe. The
caller is responsible for that stride being identical in every thread of the
launch, which is the obligation DisjointSlice::tile_2d32_rt carried before
Uniform<T> discharged it.

The witness applies unchanged. A Uniform<u32> parameter proves launch
uniformity through the kernel ABI, so index_2d_runtime can take one and
become safe, with the same argument: under a uniform stride the coordinate to
offset mapping is injective, so distinct threads resolve distinct elements.

The change is larger than the tile_2d32_rt one. index_2d_runtime is the
indexing path that predates the proof-carrying views, so the signature change
reaches intrinsic dispatch and the macro-side coordinate routing rather than a
single method.

Until this lands, the two runtime-stride APIs discharge the same premise by
different means: one through the type system, one through an unsafe caller
obligation.

The witness lands in #515.

Activity

  1. added a commit that references this issue on Aug 5, 2026
    cd5ef39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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