op-mfu-calculator

Compute MFU for matmul/GEMM operators from dimensions, time, and peak FLOPs.

7|3|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/kali20gakki/mindstudio-skills --skill op-mfu-calculator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: op-mfu-calculator
Source: https://github.com/kali20gakki/mindstudio-skills/tree/main/op-mfu-calculator
Command: npx skills add https://github.com/kali20gakki/mindstudio-skills --skill op-mfu-calculator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

通过对给定算子(如 matmul/GEMM)进行 MFU 计算,量化实际 FLOPs 与硬件峰值之间的差距,并提供推导过程的清晰说明。

Core Features & Use Cases

  • MFU 计算与结果解释:针对常见算子给出 MFU 值及其物理含义。
  • 维度与时间适配:支持标准和批量矩阵乘的场景以及注意力相关算子的推导。
  • 场景示例:性能基线评估、容量规划和瓶颈诊断中的数值解读。

Quick Start

Provide operator type, tensor shapes, and single-run time to compute MFU and compare against peak.

Frequently Asked Questions about op-mfu-calculator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate MFU for a GEMM operator using tensor shapes and execution time?

MFU calculation for matmul requires operator type, tensor shapes, single-run time, and hardware peak FLOPs. It divides actual computed FLOPs by the hardware peak to quantify the performance gap.

What does MFU mean in performance analysis and when do I need to calculate it?

MFU in performance analysis measures Machine FLOP Utilization, showing how close actual operations are to hardware limits. You need it for performance baseline evaluation, capacity planning, and diagnosing bottlenecks in matrix multiplication workloads.

Can I compute MFU for batched matrix multiplication and attention operators?

Yes, you can compute MFU for both standard and batched matrix multiplication scenarios. The calculation explicitly supports derivations for batched matmul and related attention operators using their specific tensor dimensions.

Why does my matrix multiplication performance fall short of hardware peak FLOPs?

Matrix multiplication performance falls short of hardware peak FLOPs due to bottlenecks quantified by the MFU metric. By inputting tensor shapes and execution time, you can identify the exact utilization gap and diagnose performance limits.

What inputs do I need to calculate the Machine FLOP Utilization for my operator?

To calculate Machine FLOP Utilization, you need the operator type, tensor shapes, single-run execution time, and hardware peak FLOPs. If any of these dimensions or metrics are missing, the tool will request them from you.