trtllm-test-script-builder

Generates Slurm scripts and Docker commands for TensorRT-LLM test, eval, and benchmark workloads.

14.5k|2.7k|Updated Aug 16, 2023
One-click install
npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill trtllm-test-script-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trtllm-test-script-builder
Source: https://github.com/NVIDIA/TensorRT-LLM/tree/main/.claude/skills/trtllm-test-script-builder
Command: npx skills add https://github.com/NVIDIA/TensorRT-LLM --skill trtllm-test-script-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Running TensorRT-LLM tests, accuracy evaluations, and throughput benchmarks on Slurm clusters or local Docker requires manually resolving Docker images, container mounts, GPU parallelism, MPI modes, and Slurm directives, which is error-prone and repetitive.

Core Features & Use Cases

  • Parameter Resolution: Automatically resolves the Docker image by node architecture, container mounts, partition/account, GRES flags, and PMIx MPI plugin from a pre-detected slurm_env.json file.
  • Multi-Workflow Script Generation: Produces ready-to-submit scripts for pytest, trtllm-eval, trtllm-bench, perf-sanity benchmarks, and custom commands across local Docker, local Slurm, and remote Slurm scenarios.
  • Job Manifest Output: Writes a job_spec.json manifest with log patterns, success/failure patterns, and Slurm parameters for downstream executor skills.
  • Use Case: Given a pytest command and a target Slurm partition, generate a complete .slurm script with correct #SBATCH directives, containerized srun steps, and a job_spec.json manifest in one pass.

Quick Start

Ask the agent to build a Slurm script for running a TensorRT-LLM pytest on a specific partition, providing the test command, work directory, and repo root.

Frequently Asked Questions about trtllm-test-script-builder

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

FAQPage Schema
How do I generate a Slurm script for TensorRT-LLM pytest runs?

Provide the pytest command, work directory, repo root, partition, and account; the builder resolves the Docker image, mounts, and Slurm parameters, then runs build_slurm_script.py with the pytest subcommand to write a .slurm script and job_spec.json.

How to run trtllm-bench throughput benchmarks on a Slurm cluster?

Pass a bench_cmd containing prepare-dataset and throughput steps joined by &&. The builder parses --tp/--pp/--ep to compute world_size, splits the command into prep and run srun steps, and generates a single-node bench Slurm script.

Does trtllm-eval support multi-node execution?

No, trtllm-eval is single-node only. If world_size exceeds the node's GPU count, the builder falls back to the perf-sanity path using submit.py with accuracy.enable_accuracy_test set to true in the benchmark config YAML.

What are the GPU and node limits for pytest and custom workflows?

Pytest and custom workflows are limited to a maximum of 8 GPUs and exactly 1 node. If required_devices exceeds 8 or the computed node_count exceeds 1, the builder stops and reports an error.

Why is the --gres line missing from my generated Slurm script?

The #SBATCH --gres line is omitted when the target partition reports a GRES value of (null) in slurm_env.json. It is only emitted when the partition's gres field starts with gpu:, such as gpu:4.

How is the Docker image selected for a Slurm partition?

The builder reads the partition's architecture from slurm_env.json and maps aarch64 to the LLM_SBSA_DOCKER_IMAGE key and x86_64 to the LLM_DOCKER_IMAGE key in the repo's image-tags properties file.