Skip to content

new pto.mi and vmi dsl primitives for RoPE kernel - #498

Open
learning-chip wants to merge 60 commits into
mouliangyu:feature-vmifrom
learning-chip:mi_dsl_rope
Open

new pto.mi and vmi dsl primitives for RoPE kernel#498
learning-chip wants to merge 60 commits into
mouliangyu:feature-vmifrom
learning-chip:mi_dsl_rope

Conversation

@learning-chip

@learning-chip learning-chip commented Jul 9, 2026

Copy link
Copy Markdown

by @MirkoDeVita98

See ‎ptodsl/examples/rope_mi.py and ‎ptodsl/examples/rope_vmi.py

vmi vs mi accuracy agree learning-chip#2

@castigli castigli left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see standalone python tests for the new primitives, vdintlv/vintlv, worth adding.

Comment on lines +42 to 45
def _mlir_uses_vmi_dialect(mlir_text: str) -> bool:
return "pto.vmi." in mlir_text


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_mlir_uses_vmi_dialect does a raw substring check that could false-positive on comments/string literals containing pto.vmi.. Consider a slightly more robust check

@learning-chip
learning-chip marked this pull request as ready for review July 13, 2026 14:43
@learning-chip learning-chip changed the title add pto.mi dsl primtiives to run rope test new pto.mi and vmi dsl primitives for RoPE kernel Jul 13, 2026
@MirkoDeVita98

MirkoDeVita98 commented Jul 13, 2026

Copy link
Copy Markdown
| dtype | mode | backend | RVEC span | MaxDur |
|-------|------|---------|----------:|-------:|
| f16  | HALF       | cce | **1692** | 8235 |
| f16  | HALF       | mi  | **19231** | 25159 |
| f16  | HALF       | vmi | **19229** | 25137 |
| f16  | INTERLEAVE | cce | **3036** | 9324 |
| f16  | INTERLEAVE | mi  | **21320** | 27218 |
| f16  | INTERLEAVE | vmi | **17958** | 23846 |
| bf16 | HALF       | cce | **2896** | 9332 |
| bf16 | HALF       | mi  | **22111** | 28057 |
| bf16 | HALF       | vmi | **22109** | 28024 |
| bf16 | INTERLEAVE | cce | **3724** | 10046 |
| bf16 | INTERLEAVE | mi  | **25160** | 31087 |
| bf16 | INTERLEAVE | vmi | **17958** | 23861 |
| f32  | HALF       | cce | **1691** | 9231 |
| f32  | HALF       | mi  | **19217** | 26442 |
| f32  | HALF       | vmi | **19229** | 26449 |
| f32  | INTERLEAVE | cce | **3036** | 10440 |
| f32  | INTERLEAVE | mi  | **21295** | 28495 |
| f32  | INTERLEAVE | vmi | **17478** | 24847 |

@mouliangyu
mouliangyu force-pushed the feature-vmi branch 2 times, most recently from f090b05 to adcbeb9 Compare July 21, 2026 06:41
@mouliangyu
mouliangyu force-pushed the feature-vmi branch 4 times, most recently from 66d0335 to 6404205 Compare July 28, 2026 01:18
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.

4 participants