tt-lang-profile-optimize

Profile and optimize TT-Lang kernels using TT-Metal tooling.

341|51|Updated Aug 22, 2024
One-click install
npx skills add https://github.com/tenstorrent/tt-forge --skill tt-lang-profile-optimize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tt-lang-profile-optimize
Source: https://github.com/tenstorrent/tt-forge/tree/main/skills/tt-lang-profile-optimize
Command: npx skills add https://github.com/tenstorrent/tt-forge --skill tt-lang-profile-optimize

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Profiling and optimizing TT-Lang kernels to achieve better runtime performance, making it easier to identify bottlenecks and apply targeted improvements.

Core Features & Use Cases

  • Auto-profiling and signpost-based performance measurement to locate hotspots in TT-Lang kernels.
  • Perf summaries and workflow guidance to structure an end-to-end optimization cycle.
  • Use Case: A TT-Lang kernel that runs slowly on a given hardware config can be instrumented, profiled, and tuned following the workflow outlined in this Skill until a target throughput is met.

Quick Start

Run the profiler on a TT-Lang kernel file to generate baseline performance data.

Frequently Asked Questions about tt-lang-profile-optimize

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

FAQPage Schema
How do I profile TT-Lang kernels to identify performance bottlenecks?

To profile TT-Lang kernels, you can use auto-profiling and signpost-based measurement to locate performance hotspots. This requires configuring TT-Metal tooling environment variables like TTLANG_AUTO_PROFILE and TTLANG_SIGNPOST_PROFILE to properly instrument and collect profiling data.

What environment variables do I need to set up for TT-Lang auto-profiling?

TT-Lang auto-profiling requires setting TT_METAL_HOME, TT_METAL_DEVICE_PROFILER, TTLANG_AUTO_PROFILE, TTLANG_SIGNPOST_PROFILE, and TTLANG_PERF_DUMP. These variables configure the TT-Metal tooling needed to instrument kernels and collect profiling data.

How do I generate a perf summary for a slow TT-Lang kernel?

To generate a perf summary for a slow TT-Lang kernel, run the profiler on the kernel file to establish baseline performance data. This utilizes the auto-profiling workflow to structure an end-to-end optimization cycle.

Can I use signposts to measure specific sections of a TT-Lang kernel?

Yes, signposts can be used for performance measurement to locate hotspots within TT-Lang kernels. By enabling TTLANG_SIGNPOST_PROFILE, you can instrument specific code sections and collect targeted profiling data.

What is the best way to optimize TT-Lang kernels for target hardware throughput?

The best way to optimize TT-Lang kernels is following an end-to-end optimization workflow: instrument the kernel with auto-profiling, analyze the perf summary to find bottlenecks, and apply targeted tuning until the target throughput is met.

Does TT-Lang profiling work for both development and production workloads?

Yes, TT-Lang profiling can be applied during both development and production workloads. It focuses on auto-profiling, perf summaries, and signposts to continuously identify bottlenecks and apply targeted performance improvements.