Bash script to kill TPUv5e(TPUv5lite) consuming process
Bash script to kill TPUv5e(TPUv5lite) consuming process

Bash script to kill TPUv5e(TPUv5lite) consuming process

Tags
MLDL Framework
GCP
TPU
Published
Published March 25, 2024

Issue

TPUv5 does not live at /dev/accel0 β€” where TPUv3 and TPUv4 live
β†’ sudo fuser -k /dev/accel0 does not work

Solution

TPUv5e(TPUv5lite) lives at /dev/vfio/0

Bash script with gcloud command to kill TPU consuming process

# seq len 2048 export TPU_NAME='v5e-256' export ZONE='europe-west4-b' echo "[local] Killing TPU" gcloud compute tpus tpu-vm ssh $TPU_NAME \ --zone $ZONE --worker=all --command "sudo fuser -k /dev/vfio/0" # TPUv5μ—μ„œλŠ” /dev/vfio/0κ°€ μž₯λΉ„ 이름이닀. echo "[local] Removing TPU Lock" gcloud compute tpus tpu-vm ssh $TPU_NAME \ --zone $ZONE --worker=all --command "sudo rm -f /tmp/libtpu_lockfile"
Β