hpc-python

Apply latency hiding patterns to Python HPC workloads with CUDA streams.

3|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/JoaquinCampo/Skills --skill hpc-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hpc-python
Source: https://github.com/JoaquinCampo/Skills/tree/main/hpc-python
Command: npx skills add https://github.com/JoaquinCampo/Skills --skill hpc-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python HPC patterns — threading/multiprocessing/async, CUDA streams, latency hiding, PyTorch DDP. Use when writing performance-sensitive Python code, distributed training, or parallel data processing.

Core Features & Use Cases

  • Overlap CPU and GPU work with threading, multiprocessing, asyncio, and CUDA streams.
  • Implement latency hiding with double buffering, compute/communication overlap, and DDP optimizations.
  • Build scalable data pipelines and HPC workflows for Python-based ML and scientific computing.

Quick Start

Run a minimal latency-hiding example that overlaps data transfer with computation in a PyTorch training loop.

Frequently Asked Questions about hpc-python

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

FAQPage Schema
How do I overlap data transfer and computation in PyTorch to hide latency?

Latency hiding reduces idle time in Python HPC workloads by overlapping data transfer and computation. It uses threading, multiprocessing, asyncio, and CUDA streams to maximize hardware utilization in performance-sensitive distributed training.

How do I use CUDA streams for compute and communication overlap in distributed training?

CUDA streams enable compute and communication overlap by assigning data transfers and kernel executions to separate streams. Combined with PyTorch DDP, this allows concurrent operations that minimize synchronization bottlenecks in distributed training.

Do I need a CUDA-enabled GPU to run Python HPC concurrency patterns?

Yes, applying CUDA stream overlap and double buffering requires a CUDA-enabled GPU. Additionally, PyTorch is required to execute the distributed training scenarios and manage the careful synchronization needed to avoid deadlocks.

What is the best way to build scalable data pipelines for Python-based ML and scientific computing?

The best way to build scalable data pipelines is combining multiprocessing and asyncio for parallel data processing. These concurrency patterns allow overlapping CPU and GPU work, maximizing throughput for HPC workflows.

Why does my Python HPC workload deadlock during stream synchronization?

Deadlocks during stream synchronization occur when careful synchronization is mishandled across CUDA streams. Correctly managing double buffering and stream overlap is required to avoid blocking dependencies between concurrent compute and data transfer operations.