Repository navigation
Conversation
…indices When a pointer tile depends on loaded values, e.g. `tl.load(v_ptr + rows[:, None] * D + offs_d[None, :])` with `rows` loaded from memory, the sanitizer concretizes it and `_collect_tensor_base` returns a nested list of addresses. `_resolve_tensor` only handled a flat list and crashed with `TypeError: int() argument must be ... not 'list'`. Flatten nested candidates before matching them against registered tensors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016HMpCLXdUVNfMbJTj8aHE2
Performance Benchmark
Iterations: 1 warmup + 20 measured |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the pointer of a load or store depends on loaded values, the sanitizer concretizes it. For a 2-D pointer tile, such as
_collect_tensor_basereturns a nested list of addresses.SymbolicClient._resolve_tensorhandled only a flat list, so the sanitizer crashed withThis PR flattens nested candidates before they are matched against the registered tensors. The flat-list and scalar cases are unchanged.
Tests
test_sanitizer_resolves_2d_pointer_tile_from_loaded_indicesintests/end_to_end/test_sanitizer.py, with an in-bounds case (no record) and a case with one loaded row index past the end ofv(record reported). Both cases fail with theTypeErrorabove without the fix. Because both cases launch the same kernel with the same signature, the test clears_fn_symbolic_cache_setso that the second case is analyzed rather than replayed.pytest tests/: 368 passed, 6 skipped (Python 3.12, Triton 3.8.0,tilelensinstalled in editable mode with its CLIs onPATH).ruff checkandruff format --check(v0.1.9, as pinned in.pre-commit-config.yaml) pass on both changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_016HMpCLXdUVNfMbJTj8aHE2