Skip to content

[MLIR Opt] Meta-compilation and auto-tuning via the MLIR transform dialect #668

Closed

Description

@godofecht

Build an auto-tuning engine using the MLIR transform dialect and hardware PMU feedback.

Problem & Goal

Hardcoded compiler heuristics are brittle across differing CPU microarchitectures.
Using the MLIR transform dialect separates algorithmic definition from optimization schedules, allowing guided search over tile sizes, unroll factors, and vector strategies driven by hardware PMU counters.

Key Deliverables

  • Generate separate MLIR transform scripts for tiling and vectorization strategies.
  • Build an auto-tuning harness measuring hardware performance counters (cache misses, IPC, pipeline stalls).
  • Implement search space exploration (Bayesian optimization / genetic search) for target microarchitectures.

Activity

  1. added
    enhancement
    roadmap
    P1-high
    on Aug 21, 2026
  2. godofecht commented on Sep 11, 2026

    @godofecht
    ContributorAuthor

    Incremental scaffold merged in #881: autotune_transform plus a microbenchmark and a report of what remains. Keeping this open for the full-pipeline integration and transform lowering documented in docs/project/MLIR_AUTOTUNING.md.

  3. godofecht commented on Oct 2, 2026

    @godofecht
    ContributorAuthor

    Merged PR #1209 adds target metadata and strategy selection to MLIR tuning schedules, with CPU/GPU/NVPTX/AMDGPU target flags and coverage. The remaining issue scope is full transform-dialect integration with measurement-driven search and cost modeling.

  4. godofecht commented on Oct 2, 2026

    @godofecht
    ContributorAuthor

    Opened #1218 with a tested Flow-native vector transform strategy. mlir_tune --strategy=vector emits a transform.structured.vectorize schedule and records flow.tune_strategy = "vector"; invalid strategies receive a diagnostic. The existing tile path remains the default.

  5. godofecht commented on Oct 2, 2026

    @godofecht
    ContributorAuthor

    PR #1218 is merged at 94a69dd. The Flow tuner now supports validated tile and vector transform strategies.

  6. godofecht commented on Oct 3, 2026

    @godofecht
    ContributorAuthor

    PR #1305 merged at 5d3b57a. Tuning benchmark inputs now reject wrapped integer values instead of accepting overflowed candidates or repetition counts.

  7. godofecht commented on Oct 3, 2026

    @godofecht
    ContributorAuthor

    PR #1312 merged at 1a907a6. The transform tuning benchmark now checks generated matmul results at both matrix boundaries before accepting a measured candidate.

  8. godofecht commented on Oct 3, 2026

    @godofecht
    ContributorAuthor

    PR #1319 merged at f982fc0. MLIR tuner options now reject bare flags that would otherwise silently retain defaults. Native tuner coverage passes 22/22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-highcompilerenhancementroadmap

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions