IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo struct

TargetProfile

struct TargetProfile

Unified hardware target description.

Bundles everything the framework needs to know about a specific GPU target into a single struct:

  • cost_model: per-op costs (resource, latency, role)
  • pipeline: pipeline structure (depth, MMA grid, buffer strategy)

The algorithm declares WHAT ops exist (logical op table). The TargetProfile describes HOW the hardware executes them. Platform- specific factories (e.g., mi355x_target() in amd_target.mojo) provide both from a single call β€” no redundant configuration.

Usage: # Platform-specific factory (from amd_target): comptime target = mi355x_target() var annotated = annotate_ops(logical_ops, target.cost_model) var config = target.pipeline

Fields​

  • ​cost_model (TargetCostModel):
  • ​pipeline (PipelineConfig):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

Methods​

__init__​

__init__(out self, cost_model: TargetCostModel, pipeline: PipelineConfig)