cudaq-guide
CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.
tilegym-improve-cutile-kernel-perf
Iteratively optimize cuTile kernel performance through systematic profiling, bottleneck analysis, IR comparison, and targeted tuning. Covers tile sizes, occupancy, autotune configs, TMA, latency hints, persistent scheduling, num_ctas, flush_to_zero, and IR-level debugging. Use when asked to "optimize cutile kernel", "improve kernel perf", "tune cutile performance", "make kernel faster", or iteratively benchmark and refine a cuTile GPU kernel in the TileGym project.
Full skill instructions
Systematically profile, diagnose bottlenecks, and iteratively tune a cuTile kernel's performance in the TileGym repository.
Follow the three phases in order: Setup the environment and baseline, run the Experimentation loop with a tracked log, then iterate The experiment loop until perf goals are met or further gains plateau.
Work with user to prepare optimization environment:
Create a fresh git branch: Propose a branch name, e.g., cutile-perf-<kernel_name>-<date> from current branch. Checkout git checkout -b <branch name>
Locate the target kernel:
src/tilegym/suites/<suite>/cutile/ or src/tilegym/ops/cutile/@ct.kernel decorated function(s), the launch wrapper (ct.launch() or ct_experimental.autotune_launch()), the @register_impl registration, and current autotune configs (if any)Classify the kernel:
Note: classification is only used to pick the optimization priority order in the experiment loop. The core metric is always latency (ms).
Check GPU environment:
Study related references:
references/optimization-playbook.md: Step-by-step recipes for each optimization (A through J) with before/after code examplesreferences/perf-knobs-catalog.md: Complete catalog of all tunable parameters (TMA, persistent scheduling, occupancy, tile sizes, latency hints, etc.)references/cutile-api-reference.md: cuTile API reference and 18 critical rulesreferences/performance-model.md: Roofline/performance model, bottleneck diagnosis, autotuningreferences/ir-dump-guide.md: IR dump, analysis, and error diagnosisreferences/cutile-patterns-reference.md: Common cuTile patterns and conversion quick-referenceCreate @sandbox/perf_results.md to track progress. The first run will write a baseline
Confirm and go: Once you get confirmation, kick off the experimentation
Every experiment iteration applies ONE optimization to the target kernel, verifies correctness, re-benchmarks, and records results. Each iteration should be enforced to finish within 10 minutes.
latency (ms)latency (ms) shall not regress > 2% compared to baseline.src/tilegym/suites/<suite>/cutile/ or src/tilegym/ops/cutile/: kernel body, tile sizes, occupancy, num_ctas, TMA usage, latency hints, flush_to_zero, autotune configs, persistent scheduling, and other cuTile-specific parameterspython -m pytest tests/suites/.../test_<kernel_name>.py -k "test_ and cutile and not test_perf" -v
For each iteration:
python -m pytest ... --print-record → extract latency (ms)Benchmark cmdlines:
python -m pytest tests/suites/.../test_<kernel_name>.py -k "test_perf and cutile" --print-record -v
latency sample:
Cutile: {'forward': {'mean': 3.7903138461538455, 'std': 0.0016941310873207053, 'rel_std': 0.044696327430505396, 'median': 3.789880999999999, 'min': 3.7883389999999992, 'max': 3.7941230000000004, 'nrep': 13, 'peak_mem_mb': 913}} ms
Use @sandbox/perf_results.md to record each iteration's results. It should only contain a Markdown table with 5 columns:
iteration: iteration number, starting from 0 (baseline)optimization: what was applied (e.g., "baseline", "TMA replace gather", "persistent scheduling")latency_ms: kernel latency in milliseconds, six decimal pointscorrectness: PASS or FAILstatus: Whether this iteration was keep, revert, or crashExample content:
| iteration | optimization | latency_ms | correctness | status |
|----------:|:-------------------|-----------:|:------------|-------:|
| 0 | baseline | 0.820000 | PASS | keep |
| 1 | TMA replace gather | 0.390000 | PASS | keep |
Create the tabular header if the file was empty. Append one line for each iteration.
The first iteration (iteration 0) will not change any code and simply run the correctness test and performance benchmark. Results will be listed at the first row as baseline.
Core methodology is to apply ONE optimization per iteration from the playbook, verify correctness, benchmark, and decide whether to keep or revert. Try one optimization at a time, and have clean experiment records.
LOOP:
Check git status: Current git branch/commit we're on
Select and apply ONE optimization from references/optimization-playbook.md:
Verify correctness — if fails, revert immediately. Common causes: flush_to_zero/rounding_mode=APPROX changed results, tile size OOB, allow_tma=False semantics, persistent loop bound error
Re-benchmark and compare against current baseline
Git commit
Record results to @sandbox/perf_results.md
Decision rules:
| Outcome | Action |
|---|---|
Improvement(latency (ms)) >= 5% | Accept as new baseline, continue |
| Improvement 2-5% | Accept, lower priority for next iteration |
| Improvement < 2% | Accept but stop unless user wants more |
| Regression on any config | Revert immediately, try next optimization |
| No improvement after 2 consecutive iterations | Stop |
Root cause is scheduling or unknown | Escalate to user |
If keeping, advance the baseline numbers and continue loop
If reverting, git reset back to where you started and try the next optimization in priority order UNTIL: all attempts are finished, or more than 25 iterations have occurred, or the user interrupts
Be autonomous: Ask user clarifications at setup phase. Once stepped into the experiment loop, do not pause to ask user feedback: Use your best judgement for decision making, consult the optimization playbook and perf knobs catalog promptly, and think harder if stuck.
CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.
Use when the user wants to create a dataset, generate synthetic data, or build a data generation pipeline.
NVIDIA DeepStream SDK development with Python pyservicemaker API. Use when building video analytics pipelines, GStreamer-based video processing, TensorRT inference integration, object detection/tracking, or Kafka/message broker integration.
Filesystem RAG benchmarks: corpus/, train.json, evaluate_rag.py (RAGAS quality). Not for prod monitoring, latency/throughput benchmarking (use rag-perf), or evals outside this repo layout.
Use when the user wants to search, query, extract, transcribe, describe, quote, filter, or aggregate across documents — PDFs, scanned forms / images (`.jpg` `.png` `.tiff`), Office (`.docx` `.pptx`), text (`.html` `.txt`), audio (`.mp3` `.wav` `.m4a`), or video (`.mp4` `.mov`). Prefer this over native Read / Grep for multi-file or non-PDF corpora. Not for: editing files, web browsing, single-file plain-text lookups, fine-tuning.
Coordinate the end-to-end CAD/source-asset to SimReady workflow. Use for broad requests such as CAD to SimReady, source asset to simulation-ready USD, or prop packaging that require conversion, material/physics assignment, SimReady conformance, validation, and optional package creation; deploy or verify Content Agents services first when property assignment is enabled; route single-stage work through nested references.
Use this skill to bring any vision model from HuggingFace or NVIDIA NGC into an NVIDIA DeepStream pipeline with end-to-end automation: ONNX download, SafeTensors export, TRT engine build, custom nvinfer bbox parser, multi-stream benchmark, and PDF report. Object detection models only.
Top-level workflow skill for USD performance diagnosis and optimization. Handles slow loading, high memory, low FPS, and broad scene-optimization requests; delegates auth/runtime setup to Phase 0 owners.
Vehicle routing (VRP, TSP, PDP) with cuOpt — Python API only. Use when the user is building or solving routing in Python.
Use only to generate or update a governance skill card for a specified existing agent skill directory. Do not use for explaining, listing, comparing, or discussing skill capabilities.
Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.
Performance benchmarking for a deployed NVIDIA RAG Blueprint server: profiling pass + aiperf load test driven by a single YAML config. Not for accuracy / RAGAS scoring (use rag-eval) or for deploying / repairing services (use rag-blueprint).
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience