Skip to main content

Cooling Cube

GPU cluster tail latency optimizer for DDP training and multi-GPU inference.

Reduces per-step tail latency by identifying pressure workers and computing start-time offsets. Works on 8–64 GPU clusters. Zero negative gains guaranteed.

Install

pip install coolingcube

CLI usage

# From a timing log file
coolingcube --logs timing.json

# Inline worker times (microseconds)
coolingcube --workers '{"0": 12000, "1": 11800, "2": 15500, "3": 12500}'

# JSON output
coolingcube --logs timing.json --json

Python usage

from coolingcube import optimize

result = optimize({
    "0": 12000,
    "1": 11800,
    "2": 15500,
    "3": 12500,
})

print(f"Gain: {result['gain_pct']:.3f}% ({result['gain_us']:.1f} µs)")
print(f"Schedule: {result['best_schedule']}")

Collecting logs from PyTorch DDP

import time
import torch
import torch.distributed as dist

timing_logs = {}

for step in range(num_steps):
    t0 = time.perf_counter()
    loss = model(batch)
    loss.backward()
    optimizer.step()
    dist.barrier()
    elapsed_us = (time.perf_counter() - t0) * 1e6

    rank = dist.get_rank()
    timing_logs[str(rank)] = elapsed_us  # average over steps in practice

# After training loop, on rank 0:
if dist.get_rank() == 0:
    from coolingcube import optimize
    result = optimize(timing_logs)
    print(f"Gain: {result['gain_pct']:.3f}%")

Log file formats

Cooling Cube accepts several formats automatically:

{"0": 12345, "1": 11800, "2": 13000}
[{"rank": 0, "total_iter_time": 0.186}, {"rank": 1, "total_iter_time": 0.212}]
{"workers": [{"rank": 0, "step_time": 0.172}, ...]}

How it works

Standard DDP holds all workers at the barrier until the slowest finishes. The bottleneck is usually not the straggler itself but the pressure workers pushing it — workers with slightly elevated times that create synchronization pressure.

Cooling Cube identifies those pressure workers and computes per-worker start-time offsets to reduce tail latency. The algorithm uses a Ridge surrogate model and converges in 40–80 oracle calls regardless of cluster size.

Typical gains: 0.2–0.9% step-time reduction on heterogeneous or PCIe-bound clusters.

Free

Free for open source and research use. No account required.

https://coolingcube.cc · CoolingCubeInfo@proton.me

Metadata

Release files for coolingcube 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coolingcube 0.1.1
File Size Uploaded Provenance Actions
coolingcube-0.1.1.tar.gz 5.2 kB Without provenance Details for coolingcube-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for coolingcube 0.1.1
File Interpreter ABI Platform Actions
coolingcube-0.1.1-py3-none-any.whl Python 3 none any Details for coolingcube-0.1.1-py3-none-any.whl

Total release size: 11.1 kB

Release files / coolingcube-0.1.1.tar.gz

Download URL coolingcube-0.1.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e2432631f40436dd7401c7286024696751e984d53dabd7b91726a9cd4dca063c
BLAKE2b-256 checksum
How to use checksums
9042bc6899eff803af6ef00cef172d2fa6b433e5ace4dbe2ba70b8501f2a9466
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / coolingcube-0.1.1-py3-none-any.whl

Download URL coolingcube-0.1.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f0d34f296404dba6800646f615f05a3cea61b6a06a231cc285ded22bf8c4092
BLAKE2b-256 checksum
How to use checksums
764714c5dc27b1a8480127bafb1c5050910dc2c903eab1a19501cb763b311ec3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for coolingcube 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page