Skip to content

build: Makefile targets to source-build the IREE runtime (CUDA + Metal) #571

Closed

Description

@inureyes

Part of #570

Summary

Wrap the source-built IREE runtime setup (scripts/iree/setup-cuda.sh and scripts/iree/setup-macos.sh) in idempotent Makefile targets so the measurement environment for the rest of this epic is reproducible from a fresh checkout, rather than a local uncommitted artifact.

Scope

  • make iree: auto-detect the host (Linux + CUDA vs macOS + Metal) and dispatch to the correct recipe.
  • make iree-cuda: run the validated scripts/iree/setup-cuda.sh recipe (flatcc-only submodule, pinned IREE version) to build the CUDA runtime.
  • make iree-metal: run scripts/iree/setup-macos.sh to build the Metal runtime.
  • make iree-env: print the environment (paths, pinned IREE version, HAL driver) that a cargo build --features xla-iree links against.
  • Targets must be idempotent: re-running does not rebuild from scratch when the pinned artifact is already present.

Integration / acceptance

  • From a fresh checkout, make iree-cuda && cargo build --release --features xla-iree links against the freshly built runtime and runs token-exact on a GPU through the normal load / serve path (the recipe equals the validated setup-cuda.sh: flatcc-only submodule, pinned IREE version).
  • make iree-metal produces a working Metal runtime that the xla-iree build links against.
  • make iree-env prints the resolved paths and pinned version.
  • The mlxcel-xla crate README build section references make iree instead of the ad-hoc script invocation.
  • This is the enabler that unblocks measurement for the rest of the epic; it adds no new runtime perf itself. Acceptance is the reproducible build wired into the documented developer workflow, not just the presence of the Makefile targets.

Dependencies

None. This is the Phase 0 enabler.

Activity

  1. added
    type:choreMaintenance tasks (build, CI, etc.)
    area:inferenceGeneration, sampling, decoding (incl. speculative, DRY)
    and removed on Jul 1, 2026
  2. self-assigned this
    on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:inferenceGeneration, sampling, decoding (incl. speculative, DRY)priority:highHigh prioritystatus:doneCompletedtype:choreMaintenance tasks (build, CI, etc.)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions