논문 해설
MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning
MLIRBench - 컴파일러와 하드웨어를 고려한 추론을 위한 벤치마크 및 데이터셋
- 연구 문제 LLM이 MLIR 프로그램 쌍의 의미 동치와 동작 차이를 실행 근거로 얼마나 정확히 판별하는지 측정하기 어렵습니다.
- 주요 결과 Gemini 3.1 Pro는 1,768개 쌍에서 하드 라벨 정확도 92.65%와 집계 점수 74.18을 기록했지만, 결과 행동 점수는 5.04/10이었습니다.
LLM은 IR을 정말 이해하는가
LLM은 Python이나 C++ 같은 소스 코드 과제에서 강한 성능을 보였지만, 컴파일러 중간 표현(IR)을 얼마나 이해하는지는 잘 알려져 있지 않습니다. 이 논문은 MLIR을 대상으로 두 프로그램이 같은 출력을 내는지, 출력이 달라지는지, 컴파일이나 실행에 실패하는지를 실행 결과에 근거해 평가할 벤치마크가 필요하다고 봅니다. 소스 수준의 코드 생성 성공률이나 단위 테스트 통과율만으로는 변환이 실제 출력에 주는 영향을 직접 측정하기 어렵습니다. 같은 출력을 내는 두 프로그램은 구조가 크게 달라질 수 있고, 작은 속성이나 인덱싱 맵 변경도 결과를 바꿀 수 있습니다.
실행으로 라벨을 만드는 파이프라인
변이 후보는 방언별 검증을 거치며 실패하면 최대 세 번까지 재생성합니다. Execution Sandbox Agent는 IREE로 두 프로그램을 같은 결정적 조건에서 컴파일하고 실행한 뒤 numpy.array_equal로 비트 단위 동치를 비교합니다. 컴파일 또는 실행에 실패하면 ERROR, 출력이 다르면 DIVERGE, 같으면 EQUIV 라벨이 부여됩니다. 이 정답 라벨은 모델이 아니라 실행만으로 정해집니다.

Figure 1 .Overview of MLIRBench.Benchmark construction (upper):PyTorch programs are lowered to torch and linalg seeds. The Mutation Agent transforms a seed𝐴 into𝐵, guided by dialect-specific structural analysis, and records the mutation metadata. The Execution Sandbox Agent executes𝐴 and𝐵 on fixed inputs to determine the ground-truth label𝑦.Execution- hidden evaluation (lower):each evaluated model receives only𝐴,𝐵, the dialect tag, and input values. The Judge Agent scores the model response using the execution record, mutation metadata, and reference explanation; only execution determines𝑦. Blue boxes denote LLM calls. The code example shows a row-wise max reduction whose initial value is changed from−∞ (0xFF800000in MLIR) to0.0.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.
Figure 2 .Dataset construction pipeline. MLIRBench starts from curated PyTorch programs, lowers them into torch and linalg MLIR, applies dialect-specific mutation rules, and validates the resulting program pairs through compilation and execution.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.실행을 숨긴 채 모델을 채점하는 방식
LLM Reasoning Agent는 두 MLIR 프로그램, 방언 태그, 결정적 입력값만 받고 실행 출력, 정답 라벨, Judge 점수는 받지 않습니다. 모델은 A와 B의 출력을 먼저 예측한 뒤 EQUIV, DIVERGE, ERROR 중 하나의 라벨을 냅니다. Judge Agent는 실행 기록을 기준으로 하드 라벨 정확도를 결정론적으로 계산하고, 결과 행동 점수 r과 설명 품질 q를 채점합니다.

Table 2 .Reasoning Agent evaluation scale.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.
Table 19 .Judge Agent configuration.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 20쪽에서 그림 영역을 추출했습니다.라벨 정확도와 행동 예측의 격차
Gemini 3.1 Pro는 1,768개 쌍 전체에서 92.65%의 하드 라벨 정확도와 74.18의 집계 점수를 기록했습니다. 같은 모델의 결과 행동 점수는 5.04/10이었습니다. 하드 라벨 정확도는 높았지만 예측된 출력 행동의 점수는 낮아, 정답 라벨을 맞혀도 구체적 실행 행동을 정확히 추적하지 못했다는 격차가 보입니다. 같은 모델은 ERROR 사례의 97.02%를 맞혔으나 DIVERGE 사례는 68.73%만 맞혔고, 실제로 발산하는 84개 쌍을 EQUIV로 잘못 분류했습니다.

Figure 3 .Benchmark performance across nine evaluated models on 888 linalg and 880 torch pairs. Label accuracy includes all attempts; result and explanation scores are normalized by their maxima and averaged over valid responses.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.변이 수준별 난이도 차이
변이 수준은 L1에서 L5까지 구문 보존 편집부터 오류 유발 변이까지 나뉩니다. Gemini 3.1 Pro는 L5에서 94.94점으로 높았지만, 여러 다른 모델은 L5에서 낮은 점수를 보였습니다. 그러나 이 수준별 난이도가 하나의 단조로운 순서를 이루지는 않으며, 실패 유도 변이에 강한 모델도 있었습니다. 점수는 라벨 정확도와 행동 점수가 함께 반영된 값입니다.

Table 4 .Average benchmark score by mutation level, com- bininglinalgandtorch.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
Table 8 .Mutation levels used by the Mutation Agent.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.범위와 남은 문제
벤치마크는 torch와 linalg 두 방언, 40개의 시드 프로그램으로 제한됩니다. 실행 라벨은 IREE와 고정된 컴파일 구성에서 생성되므로 다른 백엔드나 하드웨어에서 결과가 달라질 수 있습니다. 설명 품질 점수는 LLM 채점에 의존하므로 진단 신호로 읽는 것이 맞습니다. 두 개의 gpt-oss-120b 응답은 JSON 계약을 지키지 못했습니다.

Table 7 .Source program seed categories used in MLIRBench.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.
Table 9 .Mutation rule coverage by dialect.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.
Table 14 .Required JSON output schema for each Reasoning Agent response.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.
Table 21 .Explanation-quality anchors.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 21쪽에서 그림 영역을 추출했습니다.
Table 24 .Model-level aggregate scores (0–100) on identical responses to the same 100 program pairs. Original denotes historical grades on this sample; R1–R3 denote fresh primary-judge repeats. Alt. changes the judge, No ref. removes the generated reference narrative, and Fixed uses structure/exactness/value maxima of 2/5/3.
원문 · CC BY 4.0 · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari · MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning · 원문 그림 인용 · 원본 PDF 24쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2026년 11월 11일
- 등록일
- 2026년 11월 13일
- 수정일
- 2026년 11월 11일
- 버전
- v1
- arXiv
- 2611.14881
- 분류
- cs.PL · cs.AI · cs.LG
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
In recent years, large language models (LLMs) have become increasingly popular in software engineering and have performed well on different programming tasks. However, it is still difficult to know whether these models truly understand program behavior or whether they mainly rely on patterns learned from their training data. This distinction is particularly important for intermediate representations (IRs), where operations, dataflow, and execution semantics are explicitly represented. In this paper, we introduce MLIRBench, a benchmark for evaluating how LLMs reason about MLIR programs. MLIRBench uses a multi-agent pipeline to generate program mutations, validate their behavior through execution, and construct reasoning tasks from torch and linalg program pairs. The dataset contains 1,768 validated pairs, including 888 linalg pairs and 880 torch pairs, labeled as EQUIV, DIVERGE, or ERROR. We evaluated nine models, including five open-weight and four proprietary models. Gemini 3.1 Pro achieved the highest hard-label accuracy of 92.65% across all 1,768 pairs, counting unsuccessful predictions as incorrect. Across its 1,768 scored predictions, it achieved an aggregate score of 74.18 and a judge-assigned result-behavior score of 5.04/10. These results show that strong semantic classification does not necessarily imply accurate prediction of detailed execution behavior, highlighting a gap in current LLM reasoning over compiler IRs. By exposing this gap through execution-validated program pairs, MLIRBench provides a reproducible foundation for studying semantic reasoning over compiler IRs and related tasks such as program repair and semantic classification.
원문 인용
Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain, Kaining Gao, Farhan Ahmed, Ali Jannesari (2026). MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning. arXiv:2611.14881v1. https://arxiv.org/abs/2611.14881v1
BibTeX
@misc{maganti2026mlirbench,
title = {{MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning}},
author = {Pranava Sai Maganti and Meghasyam Peddireddy and Muzakker Hossain and Kaining Gao and Farhan Ahmed and Ali Jannesari},
year = {2026},
eprint = {2611.14881},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.14881v1}
}