add-ttir-d2m-lowering
OfficialStreamline TTIR→D2M lowering for TTMetal.
System Documentation
What problem does it solve?
This guide provides a structured, end-to-end approach for implementing TTIR elementwise → D2M lowering for TTMetal, capturing the required edits, integration steps, and constraints so teams can extend the lowering reliably without breaking existing flows.
Core Features & Use Cases
- Guided edits: Identify and modify the correct components (TTIRToD2M.cpp, D2MGenericRegionOps.td, and related tiles) to support a new elementwise operation.
- Kernel integration: Update TTKernelIncludesMap.h and ensure the generated TTKernel code paths remain consistent with existing patterns.
- Test coverage: Extend lit tests, add TTIR snippets, and create golden mappings to validate the new lowering path across TTIR, D2M, and TTKernel stages.
Use Case: When introducing a new elementwise operation, follow this skill to wire the operation through tablegen, the D2M rewriter, and the TTKernel backend, ensuring deterministic, testable results.
Quick Start
Follow the checklist in this skill to implement a new TTIR→D2M lowering for an elementwise op, including edits to TTIRToD2MPatterns, D2MToTTKernel mappings, and golden/tests.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: add-ttir-d2m-lowering Download link: https://github.com/tenstorrent/tt-mlir/archive/main.zip#add-ttir-d2m-lowering Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.