index-based-ops

Debug index-based compute operations like TopK, Sort, and Argmax in tt-emule.

4|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/tenstorrent/tt-emule --skill index-based-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: index-based-ops
Source: https://github.com/tenstorrent/tt-emule/tree/main/.claude/skills/index-based-ops
Command: npx skills add https://github.com/tenstorrent/tt-emule --skill index-based-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of debugging index-based compute operations like TopK, Sort, and Argmax in the tt-emule environment, where silicon-specific index choices and timing races can cause test failures.

Core Features & Use Cases

  • Kernel Validation: Provides guidance on matching test contracts for value-index pairs rather than exact silicon index parity.
  • Debugging Methodology: Offers specific strategies for isolating failures in multi-core reduction trees and dataflow shims.
  • Use Case: When a TopK kernel test fails due to index mismatches, use this Skill to determine if the values are correct and if the index failure is a valid non-deterministic tie-break or a genuine kernel bug.

Quick Start

Use the index-based-ops skill to analyze the current TopK kernel failure by comparing the op output against torch values and validating index gather metrics.

Frequently Asked Questions about index-based-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug TopK kernel test failures caused by index mismatches in tt-emule?

Debug TopK kernel test failures in tt-emule by comparing op outputs against torch values and validating index gather metrics. Determine if index mismatches are valid non-deterministic tie-breaks or genuine kernel bugs by checking if the computed values remain correct.

What strategies help isolate failures in multi-core reduction kernels and dataflow shims?

Isolate multi-core reduction kernel and dataflow shim failures using targeted debugging strategies that verify numeric metrics and index validity. Analyze cross-core semaphore handshakes and synchronization races to pinpoint architecture-specific kernel path issues causing test failures.

Why does my Argmax kernel test fail due to silicon-specific index choices in the emulator?

Argmax kernel tests fail in the emulator because silicon-specific index choices and timing races cause mismatches. Match test contracts for value-index pairs rather than expecting exact silicon index parity to validate compute operations correctly.

Can I validate Sort compute kernels by matching value-index pairs instead of exact silicon index parity?

Yes, validate Sort compute kernels by matching test contracts for value-index pairs rather than exact silicon index parity. This approach satisfies requirements for verifying numeric metrics while accounting for non-deterministic tie-breaks in the tt-emule environment.

How do I verify index validity and numeric metrics for index-based compute operations in tt-emule?

Verify index validity and numeric metrics for index-based compute operations in tt-emule by analyzing multi-core reduction trees, dataflow shims, and cross-core semaphore handshakes. Compare outputs against torch values to ensure correct kernel execution.