跳至內容

張量處理單元

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書
張量處理單元(TPU)
張量處理單元(TPU)3.0
推出年份2016年5月,​9年前​(2016-05
設計公司Google
體系結構類型神經網路
機器學習

張量處理單元(英文:Tensor Processing Unit簡稱:TPU),也稱張量處理器,是 Google 開發的特定應用積體電路(ASIC),專門用於加速機器學習[1]自 2015 年起,谷歌就已經開始在內部使用 TPU,並於 2018 年將 TPU 提供給第三方使用,既將部分 TPU 作為其雲基礎架構的一部分,也將部分小型版本的 TPU 用於銷售。

總覽

[編輯]

2016 年 5 月,Google 在 Google I/O 上宣布了張量處理單元,並表示 TPU 已經在其資料中心內部使用了超過一年。[2][3]該晶片是專門為 Google 的 TensorFlow 框架(一個符號數學庫,用於機器學習應用程式,如神經網路)設計的。[4]不過,截至 2017 年,Google 也將 CPUGPU 用於其他類型的機器學習[2]其他供應商也設計了自己的 AI 加速器,並針對嵌入式機器人市場。

Google 的 TPU 是專有的,一些 TPU 的型號已經上市。在 2018 年 2 月 12 日,紐約時報報道稱 Google 將「允許其他公司通過其雲端運算服務購買對這些晶片的存取權」。[5]Google 曾稱,它們已用於 AlphaGo 與李世乭的人機圍棋對戰[3]以及 AlphaZero 系統中。Google還使用 TPU 進行 Google 街景中的文字處理,並且能夠在不到五天的時間內找到 Google 街景資料庫中的所有文字。在 Google 相簿中,單個 TPU 每天可以處理超過1億張相片。TPU 也被用在 Google 用來提供搜尋結果的 RankBrain英語RankBrain 中。[6]

圖形處理單元(GPU)相比,TPU 被設計用於進行大量的低精度計算(如 8 位的低精度)[7],每焦耳功耗下的輸入/輸出操作更多,但缺少用於光柵化/紋理對映的硬體。[3]

根據 Norman Jouppi英語Norman Jouppi 的說法,TPU 可以安裝在散熱器組件中,從而可以安裝在資料中心機架上的硬碟機插槽中。[2]

產品

[編輯]
張量處理單元產品[8][9][10]
TPUv1 TPUv2 TPUv3 TPUv4[9][11][12] TPUv5e[13] TPUv5p[14][15] v6e (Trillium)[16][17] TPU v7 (Ironwood)[18]
推出時間 2015 2017 2018 2021 2023 2023 2024 2025
製程 28 nm 16 nm 16 nm 7 nm 未列出 未列出 未列出 未列出
裸晶尺寸 (mm2) 331 < 625 < 700 < 400 300-350 未列出 未列出 未列出
片上儲存 (MiB) 28 32 32 (VMEM) + 5 (spMEM) 128 (CMEM) + 32 (VMEM) + 10 (spMEM) 48[來源請求] 112[來源請求] 未列出 未列出
時鐘速度 (MHz) 700 700 940 1050 未列出 1750 未列出 未列出
主記憶體 8 GiB DDR3 16 GiB HBM 32 GiB HBM 32 GiB HBM 16 GB HBM 95 GB HBM 32 GB 192 GB HBM
主記憶體頻寬 34 GB/s 600 GB/s 900 GB/s 1200 GB/s 819 GB/s 2765 GB/s 1640 GB/s 7.2 TB/s
熱設計功耗 (W) 75 280 220 170 未列出 未列出 未列出 未列出
TOPS (Tera Operations Per Second) 23 45 123 275 197 (bf16)

393 (int8)

459 (bf16)

918 (int8)

918 (bf16)

1836 (int8)

4614 (fp8)
TOPS/W 0.31 0.16 0.56 1.62 未列出 未列出 未列出 4.7


第一代 TPU

[編輯]

第一代TPU是一個 8 位矩陣乘法的引擎,使用複雜指令集,並由主機通過 PCIe 3.0 匯流排驅動。它採用28 nm製程製造,裸晶尺寸小於 331 mm2時鐘速度為 700 MHz熱設計功耗為 28–40 W。它有28 MiB 的片上儲存和 4 MiB32位元累加器,取 8 位乘法器的 256×256 脈動陣列的計算結果。[19]TPU 還封裝了 8 GiB雙連結 2133 MHz DDR3 SDRAM,頻寬達到 34 GB/s。[10]TPU 的指令向主機進行資料的收發,執行矩陣乘法和卷積運算,並應用啟用功能[19]

第二代 TPU

[編輯]

第二代 TPU 於 2017 年 5 月發布。[20]Google 表示,第一代 TPU 的設計受到了主記憶體頻寬的限制,因此在第二代設計中使用 16 GB高頻寬記憶體,可將頻寬提升到 600 GB/s,效能從而可達到 45 TFLOPS[10]TPU 晶片隨後被排列成效能為 180 TFLOPS 的四晶片模組[20],並將其中的 64 個這樣的模組組裝成 256 晶片的 Pod,效能達到 11.5 PFLOPS。[20]值得注意的是,第一代 TPU 只能進行整數運算,但第二代 TPU 還可以進行浮點運算。這使得第二代 TPU 對於機器學習模型的訓練和推理都非常有用。谷歌表示,這些第二代TPU將可在 Google 計算引擎上使用,以用於 TensorFlow 應用程式中。[21]

第三代 TPU

[編輯]

第三代 TPU 於 2018 年 5 月 8 日發布。[22]谷歌宣布第三代 TPU 的效能是第二代的兩倍,並將部署在晶片數量是上一代的四倍的 Pod 中。[23][24]與部署的第二代 TPU 相比,這使每個 Pod 的效能提高了 8 倍(每個 Pod 中最多裝有 1,024 個晶片)。

第四代 TPU

[編輯]

第四代 TPU 於 2021 年 5 月 19 日發布。谷歌宣布第四代 TPU 的效能是第三代的2.7倍,並將部署在晶片數量是上一代的兩倍的 Pod 中。與部署的第三代 TPU 相比,這使每個 Pod 的效能提高了 5.4 倍(每個 Pod 中最多裝有 4,096 個晶片)。

第五代 TPU

[編輯]

2021 年,谷歌透露TPU v5的物理布局是在深度強化學習新技術的幫助下設計的。[25]谷歌聲稱TPU v5快了差不多兩倍,比TPU v4快。基於這一點和比A100更好的表現,人們推測TPU v5可能與H100一樣快,甚至更快。[26]

與v4i是v4的輕量級版本一樣,第五代也有一個名為v5e的「成本效益」的版本。2023年12月,谷歌推出了TPU v5p,宣稱其效能與H100旗鼓相當。[27]

第六代 TPU

[編輯]

2024年5月,在Google I/O會議上,谷歌推出了TPU v6e (Trillium)。[28]谷歌聲稱TPU v6比起TPU v5e可實現4.7倍的效能提升,這要歸功於大尺寸的矩陣乘法單元和更快的時鐘速度。高頻寬儲存(HBM)容量和頻寬均提高了一倍。pod可包含多達256個Trillium單元。

第七代 TPU

[編輯]

2025年4月,在Google Cloud Next會議上,谷歌推出了TPU v7 (Ironwood)。[29] 這是一款名為Ironwood的新晶片,將有兩個版本:256顆晶片叢集和9,216顆晶片叢集。Ironwood的峰值計算效能可達4,614 TFLOP。

Edge TPU

[編輯]

2018年7月,谷歌推出了用於邊緣運算特定應用積體電路Edge TPU。[30]

參見

[編輯]

參考文獻

[編輯]
  1. ^ 云张量处理单元 (TPU) | Cloud TPU. Google Cloud. [2020-07-20]. (原始內容存檔於2021-06-13) (中文(中國大陸)). 
  2. ^ 2.0 2.1 2.2 Google's Tensor Processing Unit explained: this is what the future of computing looks like. TechRadar. [2017-01-19]. (原始內容存檔於2022-02-26) (英語). 
  3. ^ 3.0 3.1 3.2 Jouppi, Norm. Google supercharges machine learning tasks with TPU custom chip. Google Cloud Platform Blog. May 18, 2016 [2017-01-22]. (原始內容存檔於2016-05-18) (美國英語). 
  4. ^ "TensorFlow: Open source machine learning"頁面存檔備份,存於網際網路檔案館) "It is machine learning software being used for various kinds of perceptual and language understanding tasks" — Jeffrey Dean, minute 0:47 / 2:17 from Youtube clip
  5. ^ Google Makes Its Special A.I. Chips Available to Others. The New York Times. [2018-02-12]. (原始內容存檔於2022-04-08) (英語). 
  6. ^ Google's Tensor Processing Unit could advance Moore's Law 7 years into the future. PCWorld. [2017-01-19]. (原始內容存檔於2019-02-18) (英語). 
  7. ^ Armasu, Lucian. Google's Big Chip Unveil For Machine Learning: Tensor Processing Unit With 10x Better Efficiency (Updated). Tom's Hardware. 2016-05-19 [2016-06-26]. 
  8. ^ Jouppi, Norman P.; Yoon, Doe Hyun; Ashcraft, Matthew; Gottscho, Mark. Ten lessons from three generations that shaped Google's TPUv4i (PDF). International Symposium on Computer Architecture. Valencia, Spain. June 14, 2021 [2025-05-04]. ISBN 978-1-4503-9086-6. doi:10.1109/ISCA52012.2021.00010. (原始內容 (PDF)存檔於2021-06-09). 
  9. ^ 9.0 9.1 System Architecture | Cloud TPU. Google Cloud. [2022-12-11]. (原始內容存檔於2022-12-11) (英語). 
  10. ^ 10.0 10.1 10.2 Kennedy, Patrick. Case Study on the Google TPU and GDDR5 from Hot Chips 29. Serve The Home. 22 August 2017 [23 August 2017]. (原始內容存檔於2021-11-23). 
  11. ^ Stay tuned, more information on TPU v4 is coming soon頁面存檔備份,存於網際網路檔案館), retrieved 2020-08-06.
  12. ^ Jouppi, Norman P.; Kurian, George; Li, Sheng; Ma, Peter; Nagarajan, Rahul; Nai, Lifeng; Patil, Nishant; Subramanian, Suvinay; Swing, Andy; Towles, Brian; Young, Cliff; Zhou, Xiang; Zhou, Zongwei; Patterson, David. TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning with Hardware Support for Embeddings. 2023. arXiv:2304.01433可免費查閱 [cs.AR]. 
  13. ^ Cloud TPU v5e Inference Public Preview, retrieved 2023-11-06.
  14. ^ Cloud TPU v5p頁面存檔備份,存於網際網路檔案館Google Cloud. retrieved 2024-04-09
  15. ^ Cloud TPU v5p Training頁面存檔備份,存於網際網路檔案館), retrieved 2024-04-09.
  16. ^ Introducing Trillium, sixth-generation TPUs. Google Cloud Blog. [2024-05-29] (美國英語). 
  17. ^ TPU v6e. Google Cloud. [2024-11-10]. (原始內容存檔於2025-05-10) (英語). 
  18. ^ Ironwood: The first Google TPU for the age of inference. Google Blog. 9 April 2025 [2025-04-09]. (原始內容存檔於2025-05-03) (英語). 
  19. ^ 19.0 19.1 Jouppi, Norman P.; Young, Cliff; Patil, Nishant; Patterson, David; Agrawal, Gaurav; Bajwa, Raminder; Bates, Sarah; Bhatia, Suresh; Boden, Nan; Borchers, Al; Boyle, Rick; Cantin, Pierre-luc; Chao, Clifford; Clark, Chris; Coriell, Jeremy; Daley, Mike; Dau, Matt; Dean, Jeffrey; Gelb, Ben; Ghaemmaghami, Tara Vazir; Gottipati, Rajendra; Gulland, William; Hagmann, Robert; Ho, C. Richard; Hogberg, Doug; Hu, John; Hundt, Robert; Hurt, Dan; Ibarz, Julian; Jaffey, Aaron; Jaworski, Alek; Kaplan, Alexander; Khaitan, Harshit; Koch, Andy; Kumar, Naveen; Lacy, Steve; Laudon, James; Law, James; Le, Diemthu; Leary, Chris; Liu, Zhuyuan; Lucke, Kyle; Lundin, Alan; MacKean, Gordon; Maggiore, Adriana; Mahony, Maire; Miller, Kieran; Nagarajan, Rahul; Narayanaswami, Ravi; Ni, Ray; Nix, Kathy; Norrie, Thomas; Omernick, Mark; Penukonda, Narayana; Phelps, Andy; Ross, Jonathan; Ross, Matt; Salek, Amir; Samadiani, Emad; Severn, Chris; Sizikov, Gregory; Snelham, Matthew; Souter, Jed; Steinberg, Dan; Swing, Andy; Tan, Mercedes; Thorson, Gregory; Tian, Bo; Toma, Horia; Tuttle, Erick; Vasudevan, Vijay; Walter, Richard; Wang, Walter; Wilcox, Eric; Yoon, Doe Hyun. In-Datacenter Performance Analysis of a Tensor Processing Unit™. Toronto, Canada. June 26, 2017. arXiv:1704.04760可免費查閱. 
  20. ^ 20.0 20.1 20.2 Bright, Peter. Google brings 45 teraflops tensor flow processors to its compute cloud. Ars Technica. 17 May 2017 [30 May 2017]. (原始內容存檔於2022-03-06). 
  21. ^ Kennedy, Patrick. Google Cloud TPU Details Revealed. Serve The Home. 17 May 2017 [30 May 2017]. (原始內容存檔於2022-06-12). 
  22. ^ Frumusanu, Andre. Google I/O Opening Keynote Live-Blog. 8 May 2018 [9 May 2018]. (原始內容存檔於2021-11-18). 
  23. ^ Feldman, Michael. Google Offers Glimpse of Third-Generation TPU Processor. Top 500. 11 May 2018 [14 May 2018]. (原始內容存檔於2021-11-18). 
  24. ^ Teich, Paul. Tearing Apart Google's TPU 3.0 AI Coprocessor. The Next Platform. 10 May 2018 [14 May 2018]. (原始內容存檔於2022-05-15). 
  25. ^ Mirhoseini, Azalia; Goldie, Anna. A graph placement methodology for fast chip design (PDF). Nature. 2021-06-01, 594 (7962): 207–212 [2023-06-04]. PMID 35361999. S2CID 247855593. doi:10.1038/s41586-022-04657-6. (原始內容存檔 (PDF)於2024-08-06). 
  26. ^ Afifi-Sabet, Keumars. Google is rapidly turning into a formidable opponent to BFF Nvidia — the TPU v5p AI chip powering its hypercomputer is faster and has more memory and bandwidth than ever before, beating even the mighty H100. TechRadar. 2023-12-23 [2024-04-08]. (原始內容存檔於2025-02-11). 
  27. ^ Mirhoseini, Azalia; Goldie, Anna. A graph placement methodology for fast chip design (PDF). Nature. 2021-06-01, 594 (7962): 207–212 [2023-06-04]. PMID 35361999. S2CID 247855593. doi:10.1038/s41586-022-04657-6. (原始內容存檔 (PDF)於2024-08-06). 
  28. ^ Introducing Trillium, sixth-generation TPUs. Google Cloud Blog. [2024-05-17]. (原始內容存檔於2025-05-07) (美國英語). 
  29. ^ Ironwood: The first Google TPU for the age of inference. Google Cloud Blog. [2025-04-09] (美國英語). 
  30. ^ Cloud TPU. Google Cloud. [2021-05-21]. (原始內容存檔於2025-05-06) (英語). 

外部連結

[編輯]