TPU で Ray を動かす Part 1: 基礎編Run Ray on TPU, Part 1: The foundations
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
Google が TPU 上で Ray を実行するための基本的なセットアップ方法と設計思想を解説し、大規模 ML ワークロードを効率化する手順を示した。
Google details how to set up and run Ray on TPUs, covering foundational architecture and configuration steps that enable scalable ML workloads on Google's custom accelerators.
要約と収集メタデータをもとに生成した AI 解説本文です。元記事全文の転載・翻訳ではありません。This AI explainer is generated from the summaries and collected metadata, not from a reproduction or translation of the full source article.
Google は開発者向けブログで、機械学習向けの独自アクセラレータである TPU 上で分散処理フレームワーク Ray を動作させるための基礎を解説する連載を始めた。第 1 回となる今回は、環境構築の手順と設計思想を中心に、大規模な ML ワークロードを効率的にスケールさせる考え方を示している。
Ray は、カリフォルニア大学バークレー校の研究プロジェクトを起源とし、現在は Anyscale が開発を主導するオープンソースの分散コンピューティング基盤である。タスクやアクターといった抽象化を通じて Python のコードを複数マシンにまたがって並列実行できる点が特徴で、分散学習やハイパーパラメータ探索、モデルのサービングなど幅広い用途で採用されている。
一方の TPU は、Google が自社設計した ML 専用チップで、多数のチップとホストを高速に接続した「Pod」構成によって大規模なモデル学習を担う。従来、TPU は JAX や TensorFlow、PyTorch/XLA といったフレームワークから利用されることが多かったが、複数ホストにまたがる処理の調整やジョブ全体のオーケストレーションには追加の仕組みが求められる場面がある。
今回の記事は、この調整役として Ray を組み合わせる方針を提示している。TPU VM 上に Ray クラスタを構成すれば、各ホストに割り当てられたチップ群を Ray のワーカーとして扱い、データ前処理から学習、推論までを一貫して管理しやすくなると見られる。Google Kubernetes Engine と連携する運用も想定されており、リソース割り当てや障害時の復旧をより柔軟に扱える可能性がある。
背景には、生成 AI の普及に伴う計算需要の高まりがある。GPU 環境では Ray と NVIDIA 系スタックの組み合わせが広く使われてきたが、Google は自社の TPU でも同様の柔軟なスケーリング体験を提供しようとしているとみられる。基礎編である本稿に続く後続記事では、より実践的な構成や性能面の検証が扱われる可能性があり、TPU を選択肢とする開発者にとって参考になりそうだ。
Google has published the first installment of a technical series explaining how to run Ray, the popular open-source distributed computing framework, on its Tensor Processing Units (TPUs). The pairing matters because Ray has become a common orchestration layer for large-scale machine learning, while TPUs are among the most powerful accelerators available for training and serving large models, and bridging the two has historically required careful configuration.
Ray originated at UC Berkeley's RISELab and is now developed largely by Anyscale. At its core, Ray provides a general-purpose model for distributed execution built around two primitives: stateless tasks and stateful actors. On top of Ray Core sit higher-level libraries such as Ray Train for distributed model training, Ray Serve for inference, Ray Data for distributed data processing, and Ray Tune for hyperparameter search. This layered design lets teams scale Python workloads across a cluster without rewriting their application logic, which is one reason Ray has been adopted across the industry for orchestrating training pipelines and reinforcement learning systems.
TPUs, by contrast, are Google's custom application-specific integrated circuits designed for the linear algebra that dominates neural network computation. They are typically programmed through XLA-compiled frameworks such as JAX, TensorFlow, or PyTorch/XLA. A key architectural detail is that TPUs are organized into pods and slices, where multiple chips are connected by a high-speed interconnect. Larger configurations span many host machines, and each host is attached to a set of TPU chips. This multi-host topology is central to understanding how Ray fits in, because a distributed framework must map its own notion of nodes and workers onto the physical arrangement of TPU hosts and chips.
The foundational piece appears to focus on that mapping. In a typical setup, a Ray cluster consists of a head node that manages cluster state and scheduling, plus a number of worker nodes that execute tasks and actors. When running on TPUs, each TPU host generally corresponds to a Ray worker, and the accelerators attached to that host become resources that Ray can schedule against. Google's guidance covers how to represent TPUs as custom resources so that Ray's scheduler places workloads on the correct hosts, an important consideration given that many TPU programs use a single-program, multiple-data (SPMD) execution model that expects all participating hosts to run in lockstep.
That difference in execution philosophy is part of why the integration is worth documenting. Ray's task and actor model is flexible and dynamic, whereas large TPU training jobs often assume a tightly coordinated, gang-scheduled group of processes. Reconciling the two means ensuring that Ray launches one worker per host, that those workers can discover one another, and that the collective communication libraries underlying JAX or PyTorch/XLA can establish the necessary connections across the slice. The series' emphasis on design philosophy suggests it aims to give readers a mental model for these tradeoffs rather than only a set of commands.
For context, this work sits alongside several related Google efforts. TPU VMs allow users to run code directly on the machines attached to the accelerators, which simplifies frameworks like Ray that assume direct host access. Google also offers KubeRay, an operator for running Ray on Kubernetes, and Ray on TPUs can be deployed through Google Kubernetes Engine, giving teams a managed path to provisioning TPU slices. Separately, Google has promoted Pathways, its own orchestration system for large-scale accelerator workloads, so Ray represents an open-source alternative that many organizations already know.
The broader significance is that combining Ray with TPUs lowers a barrier for teams that have standardized on Ray but want access to Google's accelerators without abandoning their existing tooling. It also reflects a wider industry trend in which distributed frameworks increasingly need first-class support for heterogeneous hardware, from GPUs to custom silicon. As a Part 1, the article is explicitly foundational, and readers should expect subsequent installments to build on these basics with more advanced topics such as multi-slice scaling, fault tolerance, and end-to-end training or serving examples. For now, it establishes the vocabulary and architecture needed to understand how a general distributed system and a specialized accelerator can work together.
本ページの本文と要約は 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).




