Making cudaMemcpy 5x faster on a B300 [P]

Reddit r/MachineLearning Tools

Summary

A developer released cudamemcpy-tuner, an open-source tool that speeds up pageable cudaMemcpy transfers up to 5x on NVIDIA B300 GPUs, boosting 1 GB CPU-to-GPU copies from 10.2 GB/s to 51.5 GB/s via a `cmt tune` command.

https://preview.redd.it/cjz9xy3rht1i1.png?width=1600&format=png&auto=webp&s=0eea8a5d9e53d5ea4593ce1a629bc7342a049ffa Hi everyone, I made a tool that can speed up pageable transfers for cudaMemcpy. For example: # B300, copying a 1 GB tensor to the GPU and back: import time, torch x = torch.ones(1 << 30, dtype=torch.uint8) y = x.to("cuda"); y.cpu() for name, copy in [("CPU -> GPU", lambda: (x.to("cuda"), torch.cuda.synchronize()))]: t = time.perf_counter() for _ in range(5): copy() print(f"{name}: {5 * x.nbytes / (time.perf_counter() - t) / 1e9:.1f} GB/s") $ python bench.py CPU -> GPU: 10.2 GB/s $ cmt tune -- python bench.py CPU -> GPU: 51.5 GB/s blog: https://maknee.github.io/blog/2026/CudaMemcpy/ code: https://github.com/Maknee/cudamemcpy-tuner
Original Article

Similar Articles

Overclocking DDR5 For Faster MoE Prefill and Decode

Reddit r/LocalLLaMA

A developer shows that overclocking DDR5 memory on an AMD 7950X system running llama.cpp with a SYCL backend on Intel B70 yields modest but measurable gains (up to +14% prefill, +8% token generation) for MoE models that don't fully fit in VRAM, with benefits growing at deeper context lengths.

CUDA Shared Memory Swizzling

Hacker News Top

The article explains CUDA shared memory swizzling techniques to optimize GPU memory access patterns, with code examples demonstrating performance improvements.