> transforms under transform/library/ in a TensorRT-LLM checkout. Prefer existing kernels and custom ops; use Triton only when no viable existing-kernel path exists. Use ad-graph-dump for AD_DUMP_GRAPHS_DIR workflows. Covers TRT-LLM paths, registry, default.yaml registration, graph validation, tests, and a review checklist — without prescribing profiling tools or throughput targets.
npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill ad-add-fusion-transformation
This file lives in the trtllm-agent-toolkit plugin. Paths such as tensorrt_llm/..., examples/auto_deploy/..., and tests/... are relative to a TensorRT-LLM source checkout on the user’s machine — not the plugin tree.
After installing the plugin (see the toolkit README.md), skills use the trtllm-agent-toolkit: prefix (for example trtllm-agent-toolkit:ad-add-fusion-transformation).
| Skill | Use it for |
|-------|------------|
| ad-graph-dump | Enabling AD_DUMP_GRAPHS_DIR, dump file layout, and how to read SSA graph output. |
| trtllm-codebase-exploration | Mapping existing transforms, custom ops, and search patterns before writing a pass. |
| trtllm-code-contribution | TensorRT-LLM pre-commit, tests, DCO sign-off, and PR expectations. |
| triton-kernel-writing | Implementing a Triton op only after existing-kernel lookup fails. |
| triton-tileir-optimization | Tuning existing Triton kernels for the TileIR backend when that path applies. |
Use this skill when you already know which subgraph or pattern you are targeting (from graph dumps, logs, or code reading). For dump capture and file semantics, follow ad-graph-dump first.
Do this before writing a new pass so you work on real graph structure.
AD_DUMP_GRAPHS_DIR set (see ad-graph-dump).default.yaml overlays).found / not_found), recommendation (use_existing_kernel, needs_triton_fallback, defer), and trade-offs (complexity, correctness risk).Candidate: <short-name>
Affected graph pattern: <pattern>
Existing kernel lookup: <found|not_found>
Evidence: <path/symbol>
Recommendation: <use_existing_kernel|needs_triton_fallback|defer>
Strengths / weaknesses / risks:
- ...
defer and narrow the question with one more dump or test.default.yaml entry, optional model-registry YAML.existing_kernel_path vs triton_fallback_path (or other kernel stack).[SUMMARY] matches=... before/after from AutoDeploy logs, test results.transform/library/, custom_ops/, torch.ops.auto_deploy.*, and related tests for reuse.tensorrt_llm/_torch/auto_deploy/transform/library/tensorrt_llm/_torch/auto_deploy/transform/interface.pytensorrt_llm/_torch/auto_deploy/config/default.yamltensorrt_llm/_torch/auto_deploy/utils/graph_writer.pytensorrt_llm/_torch/auto_deploy/utils/node_utils.py, tensorrt_llm/_torch/auto_deploy/utils/_graph.pytensorrt_llm/_torch/auto_deploy/custom_ops/Tests (typical):
tests/unittest/auto_deploy/singlegpu/transformations/library/tests/integration/defs/accuracy/test_llm_api_autodeploy.py (when behavior or numerics may change)Create or update a module under transform/library/ and register the class:
@TransformRegistry.register("my_transform_key")
class MyTransform(BaseTransform):
@classmethod
def get_config_class(cls):
return MyTransformConfig
Use a dedicated config class only when the pass needs parameters beyond the base transform config.
default.yamlAdd a key under transforms: in tensorrt_llm/_torch/auto_deploy/config/default.yaml. Copy the field set from the closest existing transform in the same section of the file (required keys depend on the transform config class and on how peers are declared). New experimental passes should stay enabled: false until covered by tests and dumps.
For targeted rollout, adjust registry YAMLs under examples/auto_deploy/model_registry/configs/ rather than turning on unproven passes globally.
torch.ops.auto_deploy entries.node.meta when an edge should carry it.Before Triton:
transform/library/ and custom_ops/.torch.ops.auto_deploy.* and TRT-LLM custom op definitions.Use triton-kernel-writing only when no suitable op exists and you accept owning kernel + integration work.
AutoDeploy logs [SUMMARY] matches=<n> (or skipped / disabled) per transform. Compare before and after your change; a large drop usually indicates pattern or metadata issues, not “slow runs.”
Follow trtllm-code-contribution for repo conventions. Cover:
Primary unittest location for library transforms:
tests/unittest/auto_deploy/singlegpu/transformations/library/default.yaml consistently with peer entries.matches where expected, or skipped is explained.Candidate: <name>
Path: <existing_kernel_path|triton_fallback_path|other>
Rationale:
- ...
Graph validation: <pass|fail — what files / ops>
Summary logs: <matches before / after>
Tests: <what ran>
Open risks:
- ...
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.
Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Take nvidia/ad-add-fusion-transformation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.