Skip to content

Improve debug-mode diagnostics for out-of-bounds tile indexing #1483

Description

@daedalus5

Description

When tile code indexes outside a tile's shape, Warp should report a clear,
coordinate-specific message before failing in debug mode. The diagnostic should
identify the tile storage kind, the offending coordinate dimension, the invalid
index value, and the valid range, for example:

Warp tile index out of bounds in shared tile: coordinate dimension 0 has index 1, outside valid range [0, 1) (tile rank=1)

This should cover shared tile indexing and register tile indexing paths that can
otherwise fail with generic assertions or CUDA error messages.

Context

The motivation is to make tile OOB bugs easier for users to debug. In a CUDA
failure case, an invalid shared-tile access can surface later as a generic CUDA
failure such as device-side assert triggered, without enough information to
identify which tile coordinate was invalid.

In debug mode, Warp has enough shape and coordinate information at the tile
layout layer to produce a much more useful message before the assertion. This
does not need to change release-mode behavior; the goal is better debugging
output when users enable debug mode.

Metadata

Metadata

Assignees

Labels

feature requestRequest for something to be added

Fields

No fields configured for Enhancement.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions