Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
TPU preemptible
Biaya TPU preemptible jauh lebih murah daripada TPU yang tidak dapat diakhiri. Layanan Cloud TPU dapat menghentikan (mematikan) TPU ini kapan saja, jika memerlukan resource TPU tambahan.
accelerator-type adalah jenis TPU. Untuk mengetahui informasi selengkapnya tentang
jenis akselerator yang didukung untuk setiap versi TPU, lihat
versi TPU.
preemptible memungkinkan Cloud TPU untuk mengambil alih TPU.
Harga dan kuota untuk TPU preemptible
Harga untuk TPU yang dapat diakhiri jauh lebih rendah daripada untuk TPU normal.
Untuk mengetahui detailnya, lihat halaman harga. Anda tidak akan dikenai biaya jika TPU di-preempt dalam menit pertama setelah membuatnya.
Kuota untuk TPU yang dapat diakhiri umumnya lebih tinggi, dan terpisah dari kuota untuk TPU normal. Lihat halaman kuota.
Mendeteksi apakah TPU telah di-preempt
Anda menggunakan perintah gcloud berikut untuk memeriksa apakah layanan Cloud TPU telah mengambil alih TPU Anda:
Cantumkan TPU yang tersedia:
gcloudcomputetpustpu-vmlist
--zone=us-central1-b
Output perintah menampilkan detail TPU yang dibuat di project Anda. Jika
TPU telah didahului, statusnya akan berubah dari READY menjadi PREEMPTED.
Mendesain aplikasi machine learning untuk berjalan di TPU yang dapat di-preempt
Pastikan aplikasi Anda tahan terhadap mulai ulang VM dan TPU, dengan menyimpan
titik periksa model secara rutin dan dengan mengonfigurasi aplikasi untuk memulihkan
titik periksa terbaru saat dimulai ulang.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-02 UTC."],[],[],null,["# Preemptible TPUs\n================\n\n| **Important:** TPU Spot VMs are the latest version of preemptible TPUs. New and existing preemptible TPUs continue to be supported, and TPU Spot VMs use the same pricing model as preemptible TPUs. However, TPU Spot VMs provide new features that preemptible TPUs don't support. For example, TPU Spot VMs don't have the 24 hour run time limit of preemptible TPUs. For more information, see [Manage TPU Spot VMs](/tpu/docs/spot).\n\nPreemptible TPUs cost much less than non-preemptible TPUs. The\nCloud TPU service might preempt (shut down) these TPUs at any\ntime, if it requires additional TPU resources.\n\nCreating a preemptible TPU VM\n-----------------------------\n\n### gcloud\n\n```bash\n$ gcloud compute tpus tpu-vm create demo-tpu \\\n --zone=europe-west4-a \\\n --accelerator-type=v3-8 \\\n --version=tpu-vm-tf-2.17.1-pjrt \\\n --preemptible\n \n```\n\nwhere:\n\n- `demo-tpu` is a name for the TPU.\n- `accelerator-type` is the type of TPU. For more information about supported accelerator types for each TPU version, see [TPU versions](/tpu/docs/system-architecture-tpu-vm#versions).\n- `version` is the [Cloud TPU software version](/tpu/docs/runtimes#tpu_software_versions) to install.\n- `preemptible` allows Cloud TPU to preempt the TPU.\n\nPricing and quota for preemptible TPUs\n--------------------------------------\n\nPricing for preemptible TPUs is significantly lower than for normal TPUs.\nFor details, see the [pricing page](/tpu/pricing). You are not\ncharged for TPUs if they are preempted in the first minute after you create\nthem.\n\nQuota for preemptible TPUs is generally higher, and is separate from the quota\nfor normal TPUs. See the [quota page](/tpu/docs/quota).\n\nDetecting if a TPU has been preempted\n-------------------------------------\n\nYou use the following `gcloud` command to check whether the\nCloud TPU service has preempted your TPU:\n\nList your available TPUs:\n\n\u003cbr /\u003e\n\n```bash\ngcloud compute tpus tpu-vm list\n --zone=us-central1-b\n \n```\n\n\u003cbr /\u003e\n\nThe output of the command displays the details of the TPUs created in your\nproject. If a\nTPU has been preempted, the status changes from `READY` to `PREEMPTED`.\n\nFor example: \n\n```bash\nNAME ZONE ACCELERATOR_TYPE NETWORK_ENDPOINT NETWORK RANGE STATUS\ndemo-tpu us-central1-b v2-8 10.240.1.2:8470 default 10.240.1.0/29 PREEMPTED\n```\n\n\u003cbr /\u003e\n\n| **Note:** If your Cloud TPU is preempted, you must delete it and create a new one as described in [Managing TPUs](/tpu/docs/managing-tpus-tpu-vm).\n\nDesigning your machine learning application to run on preemptible TPUs\n----------------------------------------------------------------------\n\nMake sure your application is resilient to restarts of the VM and TPU, by saving\nmodel checkpoints regularly and by configuring your application to restore the\nmost recent checkpoint on restart."]]