Home›Gemini / Gemma›TPU で Ray を実行する — Part 2: Ray AI ライブラリ
Run Ray on TPU, Part 2: Ray AI libraries

TPU で Ray を実行する — Part 2: Ray AI ライブラリRun Ray on TPU, Part 2: Ray AI libraries

元記事を読むRead original articledevelopers.googleblog.com(新しいタブで開きます)(opens in a new tab)
AI要点サマリSummary highlight

Google TPU 上で Ray Train や Ray Data などの Ray AI ライブラリを活用する方法を解説し、大規模 ML ワークロードの効率的な実行を可能にする実践的な手順を紹介している。

This guide explains how to leverage Ray AI libraries such as Ray Train and Ray Data on Google TPUs, enabling scalable and efficient machine learning workloads with practical implementation steps.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (developers.googleblog.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (developers.googleblog.com).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

Google TPU上でRayを動かし、Ray Serve、Ray Data、Ray Trainを利用するための構成と配置方法を扱う。大規模な機械学習ワークロードを実行するうえで重要になるのは、TPUを固定されたグループ単位で確保する点だ。

TPUスライス

TPUチップは、スライスと呼ばれる固定グループとして接続されている。スライス内では、ホストVMがICIと呼ばれる高速リンクを共有する。複数ホストを使うモデルは、1つのスライス全体に配置されなければならない。ワーカーが別々に配置されると相互に到達できず、ジョブが停止した状態になるため、個々のチップではなくスライス単位で扱う必要がある。

GKEとRay Core

Google Kubernetes Engineは、Ray Operatorアドオンを通じてスライスをプロビジョニングし、各ホストにラベルを付ける。その上でRay Coreのslice_placement_group()を使用すると、スライス全体を一度に予約できる。これにより、複数ホストのモデルに必要なワーカーを、相互接続された同一スライスへまとめて配置する前提を整えられる。

トポロジー指定

利用時には、スライスの形状を示すトポロジーを宣言する。例として、16チップに対応する4x4の形状が挙げられている。トポロジーを指定した後の配置は、Ray Serve、Ray Data、Ray Trainが処理する。これらのRay AIライブラリをGoogle TPU上で活用し、機械学習ワークロードを効率的に実行するための構成となる。

Running Ray on TPU

This second part of the guide focuses on the Ray AI libraries used to build workloads on TPU: Ray Serve, Ray Data, and Ray Train. Their placement matters because a multi-host model must occupy an entire TPU slice; otherwise, its workers cannot reach one another and the job hangs.

The first part covered the required hardware concept and the two underlying layers, Google Kubernetes Engine (GKE) and Ray Core. This part moves from those foundations to the libraries used for machine learning workloads.

Fixed groups called slices

TPU chips are connected in fixed groups known as slices. Each slice consists of host virtual machines whose chips share a high-speed connection called the ICI.

This fixed grouping creates the main caveat when running Ray on TPU. A multi-host model cannot be placed across only part of a slice or divided in a way that prevents its workers from communicating. It has to land on one complete slice so that all workers can reach each other through the slice’s shared connection.

A slice is identified by its topology, meaning its shape. One example is a 4x4 topology containing 16 chips.

GKE and Ray Core

Google Kubernetes Engine, using the Ray Operator add-on, provisions TPU slices and labels the hosts belonging to them. Those labels provide the placement information needed to keep the relevant hosts grouped together.

Ray Core supplies the slice_placement_group() primitive. Rather than reserving TPU resources host by host, this primitive reserves an entire slice at once. The workload declares the required topology, and the reservation reflects that slice shape.

Ray AI libraries

With the topology declared and a complete slice reserved, Ray Serve, Ray Data, and Ray Train handle placement through the underlying GKE and Ray Core arrangement.

The guide presents these libraries as the layer developers actually build with. Its practical focus is using Ray Train and Ray Data, along with Ray Serve, on Google TPUs for scalable and efficient machine learning workloads while respecting the requirement that multi-host workers occupy one whole slice.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPoko4×4のトポロジーで16チップって、かなり大きそう!これって大きいこと?A 4-by-4 topology means 16 chips—that sounds huge! Is this a big deal?
  2. TECHガイドTECH Guide本文では、これはスライス形状の一例じゃ。数の多さより、複数ホストのモデルを丸ごと同じスライスへ置く点が重要なんじゃよ。The post presents that as one example of a slice shape. The key isn’t just the chip count; a multi-host model must fit entirely on one slice.
  3. ポコPokoその「スライス」って何?同じ場所に置かないと動かないって、つまりどういうこと?What exactly is a “slice”? Why does everything have to be placed together for it to work?
  4. TECHガイドTECH Guideここでのスライスは、高速リンクICIでつながったTPUチップの固定グループじゃ。別々になるとワーカー同士が届かず、処理が止まると説明されておる。Here, a slice is a fixed group of TPU chips connected through the high-speed ICI link. The guide says splitting workers across slices prevents communication and leaves the job hanging.
  5. ポコPokoじゃあ自分なら、Ray TrainやRay Dataで大きな機械学習処理を組んで、配置は任せてみたいな!Then I’d try building a large ML workload with Ray Train or Ray Data and let the system handle placement!
  6. TECHガイドTECH Guideよい発想じゃ。ただし紹介された手順では、トポロジーを宣言し、GKEとRay Operatorでホストを用意して、スライス全体を予約する必要があるぞ。A sensible plan. But in the described setup, you still declare the topology, provision hosts through GKE and the Ray Operator, and reserve the entire slice.
記事情報・収集記録Article details & collection record
出典Source
Google Developers Blog公式Official
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
EN
重要度の位置づけImportance in this lane
MediumMedium priority(Gemini / Gemma 152件中、同等以上 146件)(146 of 152 Gemini / Gemma entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.1 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
短命 (ニュース)Short-lived (news)

✨Gemini / Gemma の他の記事More from Gemini / Gemmaもっと見る →View more →

ページ上部へScroll to top