davidcastagnetoa/skills

tensorrt_onnx

Compilación y cuantización de modelos para GPU NVIDIA — hasta 5x speedup sobre PyTorch nativo

First seen Mar 6, 2026

Installation

$ npx skills add davidcastagnetoa/skills --skill tensorrt_onnx

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from davidcastagnetoa/skills · top by installs.

npx skills add davidcastagnetoa/skills

Browse all from davidcastagnetoa/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,525 B
  • docs SUMMARY.md 118 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 6 installs

SKILL.md

tensorrt_onnx

TensorRT compila modelos ONNX para el hardware GPU específico del servidor, aplicando fusión de capas, cuantización FP16/INT8 y otras optimizaciones que reducen la latencia hasta 5x.

When to use

Aplicar a todos los modelos ML antes del despliegue en producción en servidores con GPU NVIDIA.

Instructions

  1. Instalar: TensorRT viene incluido en el contenedor de Triton o instalar desde NVIDIA: pip install tensorrt.
  2. Convertir ONNX a TensorRT engine:

``python import tensorrt as trt builder = trt.Builder(logger) config = builder.createbuilderconfig() config.setflag(trt.BuilderFlag.FP16) # Activar FP16 network = builder.createnetwork(1 << int(trt.NetworkDefinitionCreationFlag.EXPLICITBATCH)) parser = trt.OnnxParser(network, logger) parser.parsefromfile('model.onnx') engine = builder.buildserialized_network(network, config) with open('model.trt', 'wb') as f: f.write(engine) ``

  1. Cargar engine en Triton con backend TensorRT.
  2. Medir speedup: comparar latencia ONNX Runtime vs TensorRT con perf_analyzer.

Notes

  • El engine TensorRT es específico del GPU model; recompilar si cambia el hardware.
  • INT8 requiere calibración con dataset representativo; FP16 es plug-and-play.
  • trtexec — herramienta CLI de diagnóstico incluida en TensorRT.