davidcastagnetoa/skills

cuda_streams

Paralelismo GPU para ejecutar múltiples inferencias simultáneamente

First seen Mar 3, 2026

Installation

$ npx skills add davidcastagnetoa/skills --skill cuda_streams

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,478 B
  • docs SUMMARY.md 89 B

History

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

SKILL.md

cuda_streams

CUDA Streams permiten ejecutar múltiples operaciones GPU en paralelo (inferencia de modelos distintos, copia de datos y cómputo simultáneo), maximizando la utilización del hardware GPU.

When to use

Usar en el workerpoolagent para ejecutar inferencias de múltiples modelos en paralelo en la misma GPU: face_match + liveness + deepfake detection simultáneamente.

Instructions

  1. Crear streams por modelo:

``python streamliveness = torch.cuda.Stream() streamfacematch = torch.cuda.Stream() ``

  1. Ejecutar inferencias en paralelo:

``python with torch.cuda.stream(streamliveness): livenessresult = livenessmodel(frame) with torch.cuda.stream(streamfacematch): facematchresult = facematchmodel(face_crop) ``

  1. Sincronizar streams: torch.cuda.synchronize().
  2. Usar torch.cuda.Event para timing preciso de cada modelo.
  3. Monitorizar VRAM: torch.cuda.memory_allocated().
  4. Limitar número de streams activos según VRAM disponible.

Notes

  • Los streams solo paralelizzan si hay recursos GPU suficientes; en GPU pequeñas pueden serializar.
  • No usar más de 4-8 streams simultáneos; más allá el overhead supera el beneficio.
  • Triton Inference Server gestiona streams automáticamente; preferir Triton si está disponible.