Run PyTorch on a Google TPU in one line: just swap cuda for tpu

kuanhoong · x · 2026-11-12

A quick tip for running PyTorch on Google TPU: swap the device selection from cuda to tpu in a single line of code. The author also shared an 11-minute video tutorial walking through the process.

Original post →

More from Infra

Infra channel →