Skip to content

[MLIR Opt] Hardware-exact register tiling intrinsic lowering - #1375

Merged
godofecht merged 4 commits into
mainfrom
issue-666-mlir-opt-3587614321935913108
Oct 6, 2026
Merged

godofecht merged 4 commits into
mainfrom
issue-666-mlir-opt-3587614321935913108

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Part of #666.

This PR implements the first slice of the hardware-exact micro-kernel epic by adding target-specific intrinsic lowering for 2D/3D register tiles.

Key changes:

  • compiler/src/mlirgen.flow: Emit hardware intrinsics (like amx.tile_mulf, arm_sme.outerproduct, nvvm.wgmma) using the correct MLIR generic operation syntax when FLOWC_MLIR_REGISTER_TILE_INTRINSICS=1 and a non-generic target is specified.
  • tools/flow_cli/mlir_tools.flow: Add the --register-tile-intrinsics flag.
  • docs/language/mlir-opt-flags.md: Document the new flag and feature.
  • tests/scripts/mlir_register_tiles.flow: Add verification for the intrinsic generation and valid MLIR formatting.

Next steps (to be done in follow-up PRs):

  • Add register pressure budget analysis to avoid stack spilling across AVX-512 / ARM Neon register files.
  • Benchmark GEMM micro-kernels against reference BLAS.

PR created automatically by Jules for task 3587614321935913108 started by @godofecht

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

…enerate bootstrap

tools/flow_cli/mlir_tools.flow: kept main's AoSoA bank-count/swizzle-width
flags and added --register-tile-intrinsics. Bootstrap regenerated from
main's with bootstrap_from_c.sh --regen (fixed point at gen2, also on
Linux x86-64).
@godofecht
godofecht merged commit 31ba485 into main Oct 6, 2026
40 checks passed
godofecht added a commit that referenced this pull request Oct 6, 2026
…ootstrap

Only compiler/bootstrap/flowc_stage_a conflicted (binary). Took main's
bootstrap C/binary, then ran bootstrap_from_c.sh --regen (fixed point at
gen2; --verify ALL PASS). Rebuilt the checked-in flowc_stage_a as Linux
x86-64 ELF on the box (gcc 14 -O2), matching main's convention. Source
auto-merge kept #1375 MLIR work alongside #729 cgen changes.
@godofecht
godofecht deleted the issue-666-mlir-opt-3587614321935913108 branch October 12, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant