As of April 2026, official PyTorch (pytorch.org) may list CUDA 12.4 as the latest. For CUDA 12.6, try:
cpu_time = benchmark('cpu') gpu_time = benchmark('cuda') print(f"CPU avg time: cpu_time 1000:.2f ms") print(f"GPU avg time: gpu_time 1000:.2f ms") print(f"Speedup: cpu_time/gpu_time:.1fx") pytorch for cuda 12.6