0Pricing
Mojo Academy · レッスン

MAXグラフ内のMojo

Mojoでカスタム演算子を記述します

「MAXグラフ内のMojo」はCoddyKit上の無料Mojo Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMojo Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Mojo Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Models Are Graphs

Inside MAX, a model is represented as a graph: a network of operations where data flows from one node to the next. 🔗

What an Op Is

Each node in the graph is an op, a single operation like a matrix multiply or an activation function applied to its inputs.

Built-in Ops

MAX ships with many built-in ops covering common layers, so most of a typical model graph works without any extra code.

The Need for Custom Ops

Sometimes your model needs an operation MAX does not include. That is when you write a custom op to fill the gap.

Mojo Powers Custom Ops

You write custom ops in Mojo, giving you systems-level speed for the exact computation your model requires.

An Op Is a Function

A custom op is essentially a Mojo function that takes input tensors and produces an output tensor for the graph.

fn my_op(x: Tensor) -> Tensor:

Speed Where It Counts

Because the op is Mojo, you can use SIMD and other tricks to make that node run as fast as the hardware allows.

Slotting Into the Graph

Once defined, your custom op is registered so MAX can place it in the graph just like any built-in operation.

Optimized Together

MAX still optimizes the full graph, including your custom node, fusing and scheduling work for the best overall throughput.

Best of Both Worlds

This pattern lets you keep a model mostly standard while dropping in a hand-tuned Mojo op exactly where you need speed.

When to Reach for It

Reach for a custom op when a missing or slow node is your bottleneck, not for parts the built-ins already handle well. ✨

Quick Check

Recall how Mojo connects to the MAX computation graph.

Recap

You saw that a MAX model is a graph of ops, and Mojo lets you write fast custom ops that slot right into it. 🎯

よくある質問

「MAXグラフ内のMojo」レッスンは無料ですか?

はい。「MAXグラフ内のMojo」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Mojo Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Mojo Academyコースには全4レッスンが含まれています。

「MAXグラフ内のMojo」で何を学びますか?

Mojoでカスタム演算子を記述します ブラウザで直接実行するハンズオンコードでMojo Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Mojo Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMojo Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「MAXグラフ内のMojo」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMojo Academyレッスンでコードを書いて実行できますか?

はい。すべてのMojo Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. MAXが提供するもの
  2. MAXグラフ内のMojo
  3. MAXによるモデルのサービング
  4. MojoとプロダクションAIの接点
← Mojo Academyに戻る