File size: 1,937 Bytes
3598ef2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c6b4e11
 
 
3598ef2
 
 
c6b4e11
3598ef2
 
c6b4e11
3598ef2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: apache-2.0
language:
- en
pretty_name: MLIR-Functional-Reference-30
size_categories:
- n<1K
task_categories:
- text-generation
tags:
- mlir
- code-generation
- compiler
- constrained-decoding
- arith
- linalg
- stablehlo
- functional-correctness
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test.jsonl
---

# MLIR-Functional-Reference-30

Hand-authored functional-correctness reference set for arith, linalg+memref, and stablehlo (n=30, 10 per dialect).

## Composition

- **Instances**: 30
- **Format**: one JSON record per line in `data/test.jsonl`
- **Schema**: fields = `canonical_fn_name`, `canonical_signature`, `dialect`, `expected_output`, `expected_output_pattern`, `expected_stdout_regex`, `id`, `inputs`, `iree_inputs`, `memref_inputs`, `memref_print`, `nl`, `result_type`, `scalar_inputs`, `source_benchmark`, `source_id`
- **Verifier**: dialect-specific lowering pipelines + execution comparison; see `run_functional.py` for the per-dialect runners
- **License**: Apache-2.0 (SPDX: Apache-2.0). No third-party IP restrictions.

## Loading

```python
from datasets import load_dataset
ds = load_dataset("plawanrath/MLIR-Functional-Reference-30", split="test")
print(ds[0])
```

Each record is a self-contained natural-language→MLIR pair; verify-valid
pass-rate under the dialect's verifier is the primary evaluation metric.

## Source format

The JSONL file at `data/test.jsonl` is the canonical HuggingFace interface.
MLCommons Croissant 1.0 metadata (`croissant.json`) ships alongside the
release.

## Datasheet

Key points (full Gebru-style datasheet ships with the dataset archive):

- All reference MLIR programs are verifier-clean at the time of release.
- Hand-authored (no crowdsourcing, no LLM-authored references).
- Test-only — fine-tuning on these benchmarks contaminates future evaluation
  and is explicitly out of scope.

## License

Apache-2.0. See `LICENSE`.