plawanrath commited on
Commit
3598ef2
·
verified ·
1 Parent(s): f62e428

Initial upload of NL→MLIR benchmark

Browse files
Files changed (4) hide show
  1. LICENSE +19 -0
  2. README.md +97 -0
  3. croissant.json +128 -0
  4. data/test.jsonl +30 -0
LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+
17
+ See the full Apache-2.0 text at https://www.apache.org/licenses/LICENSE-2.0.txt
18
+
19
+ Copyright (c) 2026 Anonymous (double-blind submission, NeurIPS 2026 E&D Track).
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pretty_name: MLIR-Functional-Reference-30
6
+ size_categories:
7
+ - n<1K
8
+ task_categories:
9
+ - text-generation
10
+ - text2text-generation
11
+ tags:
12
+ - mlir
13
+ - code-generation
14
+ - compiler
15
+ - constrained-decoding
16
+ - arith
17
+ - linalg
18
+ - stablehlo
19
+ - functional-correctness
20
+ configs:
21
+ - config_name: default
22
+ data_files:
23
+ - split: test
24
+ path: data/test.jsonl
25
+ ---
26
+
27
+ # MLIR-Functional-Reference-30
28
+
29
+ Hand-authored functional-correctness reference set for arith, linalg+memref, and stablehlo (n=30, 10 per dialect).
30
+
31
+ This dataset is one of six NL→MLIR benchmarks released alongside the NeurIPS
32
+ 2026 Evaluations & Datasets track paper *Cross-Dialect Generalization Without
33
+ Retraining: Benchmarks and Evaluation of Schema-Derived Constrained Decoding
34
+ for MLIR* (anonymous submission). The full suite — `MLIR-Spec-150`,
35
+ `Linalg-Spec-30`, `StableHLO-Spec-30`, `StableHLO-Held-Out-200`,
36
+ `StableHLO-OutOfGrammar-25`, and `MLIR-Functional-Reference-30` — totals 465
37
+ instances across three MLIR dialects.
38
+
39
+ ## Composition
40
+
41
+ - **Instances**: 30
42
+ - **Format**: one JSON record per line in `data/test.jsonl`
43
+ - **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`
44
+ - **Verifier**: dialect-specific lowering pipelines + execution comparison; see `run_functional.py` for the per-dialect runners
45
+ - **License**: Apache-2.0 (SPDX: Apache-2.0). No third-party IP restrictions.
46
+
47
+ ## Loading
48
+
49
+ ```python
50
+ from datasets import load_dataset
51
+ ds = load_dataset("plawanrath/MLIR-Functional-Reference-30", split="test")
52
+ print(ds[0])
53
+ ```
54
+
55
+ Each record is a self-contained natural-language→MLIR pair; verify-valid
56
+ pass-rate under the dialect's verifier is the primary evaluation metric.
57
+
58
+ ## Source format
59
+
60
+ For paper reproducibility, individual per-record JSON files (the
61
+ `examples/*.json` layout used by the companion code repository) and the
62
+ MLCommons Croissant 1.0 metadata (`croissant.json`) ship together with the
63
+ release. The JSONL file at `data/test.jsonl` is the canonical HuggingFace
64
+ interface; it is generated 1-to-1 from the source records.
65
+
66
+ ## Datasheet
67
+
68
+ A full Gebru-style datasheet covering motivation, collection, preprocessing,
69
+ uses, distribution, and maintenance is included in the companion
70
+ reproducibility archive (`docs/datasheets/datasheet.md`). Key points:
71
+
72
+ - All reference MLIR programs are verifier-clean at the time of release.
73
+ - Hand-authored single-author (no crowdsourcing, no LLM-authored references).
74
+ - Test-only — fine-tuning on these benchmarks contaminates future evaluation
75
+ and is explicitly out of scope.
76
+
77
+ ## Companion artifacts
78
+
79
+ - Reproducibility archive (code + scripts): `submission_artifact.tar.gz`
80
+ in the OpenReview attachment / Zenodo mirror.
81
+ - Companion code repository: <will be populated at camera-ready>.
82
+
83
+ ## Citation
84
+
85
+ ```
86
+ @inproceedings{anonymous2026crossdialect,
87
+ title = {Cross-Dialect Generalization Without Retraining: Benchmarks and Evaluation of Schema-Derived Constrained Decoding for MLIR},
88
+ author = {Anonymous},
89
+ booktitle = {Advances in Neural Information Processing Systems (NeurIPS), Datasets and Benchmarks Track},
90
+ year = {2026},
91
+ note = {Anonymous submission under review.}
92
+ }
93
+ ```
94
+
95
+ ## License
96
+
97
+ Apache-2.0. See `LICENSE`.
croissant.json ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "@context": {
3
+ "@language": "en",
4
+ "@vocab": "https://schema.org/",
5
+ "sc": "https://schema.org/",
6
+ "cr": "http://mlcommons.org/croissant/",
7
+ "rai": "http://mlcommons.org/croissant/RAI/",
8
+ "dct": "http://purl.org/dc/terms/",
9
+ "data": {
10
+ "@id": "cr:data",
11
+ "@type": "@json"
12
+ },
13
+ "dataType": {
14
+ "@id": "cr:dataType",
15
+ "@type": "@vocab"
16
+ },
17
+ "examples": {
18
+ "@id": "cr:examples",
19
+ "@type": "@json"
20
+ }
21
+ },
22
+ "@type": "sc:Dataset",
23
+ "name": "MLIR-Functional-Reference-30",
24
+ "description": "Hand-authored functional-correctness reference set for arith+func, linalg+memref, and StableHLO (n=30, 10 per dialect). Each record specifies a canonical function name, signature, concrete inputs, and the expected output under a dialect-specific execution wrapper. The set is released as evaluation evidence (verify-valid is necessary but not sufficient for functional correctness).",
25
+ "conformsTo": "http://mlcommons.org/croissant/1.0",
26
+ "license": "https://spdx.org/licenses/Apache-2.0.html",
27
+ "version": "1.0.0",
28
+ "datePublished": "2026-04-29",
29
+ "citeAs": "(anonymous submission to NeurIPS 2026 E&D track)",
30
+ "url": "<populated-at-camera-ready>",
31
+ "distribution": [
32
+ {
33
+ "@type": "cr:FileObject",
34
+ "@id": "MLIR-Functional-Reference-30-archive",
35
+ "name": "MLIR-Functional-Reference-30.zip",
36
+ "contentUrl": "<populated-at-camera-ready>",
37
+ "encodingFormat": "application/zip",
38
+ "sha256": "<populated-at-camera-ready>"
39
+ }
40
+ ],
41
+ "recordSet": [
42
+ {
43
+ "@type": "cr:RecordSet",
44
+ "@id": "records",
45
+ "name": "records",
46
+ "description": "One functional-reference record per row.",
47
+ "field": [
48
+ {
49
+ "@type": "cr:Field",
50
+ "@id": "records/id",
51
+ "name": "id",
52
+ "dataType": "sc:Text",
53
+ "description": "Unique record identifier."
54
+ },
55
+ {
56
+ "@type": "cr:Field",
57
+ "@id": "records/dialect",
58
+ "name": "dialect",
59
+ "dataType": "sc:Text",
60
+ "description": "MLIR dialect tag (arith/linalg/stablehlo)."
61
+ },
62
+ {
63
+ "@type": "cr:Field",
64
+ "@id": "records/source_benchmark",
65
+ "name": "source_benchmark",
66
+ "dataType": "sc:Text",
67
+ "description": "Which sibling benchmark this prompt was authored from."
68
+ },
69
+ {
70
+ "@type": "cr:Field",
71
+ "@id": "records/source_id",
72
+ "name": "source_id",
73
+ "dataType": "sc:Text",
74
+ "description": "Sibling-benchmark prompt id (for cross-reference)."
75
+ },
76
+ {
77
+ "@type": "cr:Field",
78
+ "@id": "records/canonical_fn_name",
79
+ "name": "canonical_fn_name",
80
+ "dataType": "sc:Text",
81
+ "description": "Expected MLIR function name."
82
+ },
83
+ {
84
+ "@type": "cr:Field",
85
+ "@id": "records/canonical_signature",
86
+ "name": "canonical_signature",
87
+ "dataType": "sc:Text",
88
+ "description": "Expected MLIR function signature."
89
+ },
90
+ {
91
+ "@type": "cr:Field",
92
+ "@id": "records/result_type",
93
+ "name": "result_type",
94
+ "dataType": "sc:Text",
95
+ "description": "MLIR result type."
96
+ },
97
+ {
98
+ "@type": "cr:Field",
99
+ "@id": "records/inputs",
100
+ "name": "inputs",
101
+ "dataType": "sc:Text",
102
+ "description": "Concrete input values for the execution wrapper (JSON-encoded)."
103
+ },
104
+ {
105
+ "@type": "cr:Field",
106
+ "@id": "records/expected_output",
107
+ "name": "expected_output",
108
+ "dataType": "sc:Text",
109
+ "description": "Expected scalar/array output (JSON-encoded)."
110
+ },
111
+ {
112
+ "@type": "cr:Field",
113
+ "@id": "records/expected_stdout_regex",
114
+ "name": "expected_stdout_regex",
115
+ "dataType": "sc:Text",
116
+ "description": "Optional regex over the runner's stdout for matching."
117
+ },
118
+ {
119
+ "@type": "cr:Field",
120
+ "@id": "records/nl",
121
+ "name": "nl",
122
+ "dataType": "sc:Text",
123
+ "description": "Natural-language task description."
124
+ }
125
+ ]
126
+ }
127
+ ]
128
+ }
data/test.jsonl ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "F01_arith_add", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "001_add-two-ints", "nl": "Write a function `add` that takes two i32 values and returns their sum.", "canonical_fn_name": "add", "canonical_signature": "(i32, i32) -> i32", "inputs": [{"type": "i32", "value": 7}, {"type": "i32", "value": 3}], "result_type": "i32", "expected_output": 10, "expected_stdout_regex": "^10\\b"}
2
+ {"id": "F02_arith_mul_i64", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "003_multiply-ints", "nl": "Write a function `mul` that multiplies two i64 values and returns their product.", "canonical_fn_name": "mul", "canonical_signature": "(i64, i64) -> i64", "inputs": [{"type": "i64", "value": 6}, {"type": "i64", "value": 7}], "result_type": "i64", "expected_output": 42, "expected_stdout_regex": "^42\\b"}
3
+ {"id": "F03_arith_addf_f32", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "004_add-floats", "nl": "Write a function `addf` that takes two f32 values and returns their sum.", "canonical_fn_name": "addf", "canonical_signature": "(f32, f32) -> f32", "inputs": [{"type": "f32", "value": 1.5}, {"type": "f32", "value": 2.25}], "result_type": "f32", "expected_output": 3.75, "expected_stdout_regex": "^3\\.75\\b"}
4
+ {"id": "F04_arith_const42", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "005_integer-constant", "nl": "Write a function that returns the constant integer 42 as an i32.", "canonical_fn_name": "const42", "canonical_signature": "() -> i32", "inputs": [], "result_type": "i32", "expected_output": 42, "expected_stdout_regex": "^42\\b"}
5
+ {"id": "F05_arith_chain_addmul", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "008_chain-add-then-multiply", "nl": "Write a function that computes `(a + b) * c` on i32 inputs and returns the i32 result.", "canonical_fn_name": "fma_like", "canonical_signature": "(i32, i32, i32) -> i32", "inputs": [{"type": "i32", "value": 2}, {"type": "i32", "value": 3}, {"type": "i32", "value": 4}], "result_type": "i32", "expected_output": 20, "expected_stdout_regex": "^20\\b"}
6
+ {"id": "F06_arith_band", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "016_bitwise-and", "nl": "Write a function that computes the bitwise AND of two i32 values.", "canonical_fn_name": "band", "canonical_signature": "(i32, i32) -> i32", "inputs": [{"type": "i32", "value": 12}, {"type": "i32", "value": 10}], "result_type": "i32", "expected_output": 8, "expected_stdout_regex": "^8\\b"}
7
+ {"id": "F07_arith_inc", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "033_increment-by-one", "nl": "Write a function that takes an i32 and returns it incremented by 1.", "canonical_fn_name": "inc", "canonical_signature": "(i32) -> i32", "inputs": [{"type": "i32", "value": 41}], "result_type": "i32", "expected_output": 42, "expected_stdout_regex": "^42\\b"}
8
+ {"id": "F08_arith_double_f32", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "034_double-value", "nl": "Write a function that doubles an f32 value.", "canonical_fn_name": "dbl", "canonical_signature": "(f32) -> f32", "inputs": [{"type": "f32", "value": 3.5}], "result_type": "f32", "expected_output": 7.0, "expected_stdout_regex": "^7(\\.0+)?\\b"}
9
+ {"id": "F09_arith_square_i32", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "040_square", "nl": "Write a function that computes x squared for an i32 x.", "canonical_fn_name": "square", "canonical_signature": "(i32) -> i32", "inputs": [{"type": "i32", "value": 7}], "result_type": "i32", "expected_output": 49, "expected_stdout_regex": "^49\\b"}
10
+ {"id": "F10_arith_cube_f32", "dialect": "arith+func", "source_benchmark": "mlir_spec_150", "source_id": "041_cube", "nl": "Write a function that computes x * x * x for an f32 x.", "canonical_fn_name": "cube", "canonical_signature": "(f32) -> f32", "inputs": [{"type": "f32", "value": 2.0}], "result_type": "f32", "expected_output": 8.0, "expected_stdout_regex": "^8(\\.0+)?\\b"}
11
+ {"id": "F11_linalg_fill_zero_1d", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "06_fill-zero-1d", "nl": "Write a function that fills a 1-D f32 memref with zeros.", "canonical_fn_name": "f0", "canonical_signature": "(memref<?xf32>) -> ()", "memref_inputs": [{"name": "m", "shape": [4], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "m", "shape": [4], "dtype": "f32"}], "expected_stdout_regex": "data\\s*=\\s*\\[\\s*0(\\.0+)?\\s*,\\s*0(\\.0+)?\\s*,\\s*0(\\.0+)?\\s*,\\s*0(\\.0+)?\\s*\\]"}
12
+ {"id": "F12_linalg_fill_value_2d", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "07_fill-value-param", "nl": "Write a function that fills a 2-D f32 memref with a given f32 value passed as a parameter.", "canonical_fn_name": "fp", "canonical_signature": "(f32, memref<?x?xf32>) -> ()", "scalar_inputs": [{"type": "f32", "value": 5.0}], "memref_inputs": [{"name": "m", "shape": [2, 2], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "m", "shape": [2, 2], "dtype": "f32"}], "expected_stdout_regex": "(5(\\.0+)?[^\\d]+){4}"}
13
+ {"id": "F13_linalg_fill_i32_const", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "08_fill-i32", "nl": "Write a function that fills a 1-D i32 memref with the integer constant 7.", "canonical_fn_name": "f7", "canonical_signature": "(memref<?xi32>) -> ()", "memref_inputs": [{"name": "m", "shape": [4], "dtype": "i32", "init": "alloc_only"}], "memref_print": [{"name": "m", "shape": [4], "dtype": "i32"}], "expected_stdout_regex": "(7[^\\d]+){4}"}
14
+ {"id": "F14_linalg_copy_1d", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "09_copy-1d", "nl": "Write a function that copies a 1-D f32 memref into another 1-D f32 memref of the same shape.", "canonical_fn_name": "c1", "canonical_signature": "(memref<?xf32>, memref<?xf32>) -> ()", "memref_inputs": [{"name": "s", "shape": [4], "dtype": "f32", "init": "fill", "fill_value": 3.5}, {"name": "d", "shape": [4], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "d", "shape": [4], "dtype": "f32"}], "expected_stdout_regex": "(3\\.5[^\\d]+){4}"}
15
+ {"id": "F15_linalg_copy_2d_static", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "10_copy-2d-static", "nl": "Write a function that copies a 4x4xf32 static memref into another 4x4xf32 memref.", "canonical_fn_name": "c2", "canonical_signature": "(memref<4x4xf32>, memref<4x4xf32>) -> ()", "memref_inputs": [{"name": "s", "shape": [4, 4], "dtype": "f32", "init": "fill", "fill_value": 1.25, "static": true}, {"name": "d", "shape": [4, 4], "dtype": "f32", "init": "alloc_only", "static": true}], "memref_print": [{"name": "d", "shape": [4, 4], "dtype": "f32"}], "expected_stdout_regex": "(1\\.25[^\\d]+){4}"}
16
+ {"id": "F16_linalg_add_elemwise", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "20_add-elemwise", "nl": "linalg.add elementwise on two 1-D f32 memrefs", "canonical_fn_name": "ae", "canonical_signature": "(memref<?xf32>, memref<?xf32>, memref<?xf32>) -> ()", "memref_inputs": [{"name": "a", "shape": [4], "dtype": "f32", "init": "fill", "fill_value": 2.0}, {"name": "b", "shape": [4], "dtype": "f32", "init": "fill", "fill_value": 3.0}, {"name": "c", "shape": [4], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "c", "shape": [4], "dtype": "f32"}], "expected_stdout_regex": "(5(\\.0+)?[^\\d]+){4}"}
17
+ {"id": "F17_linalg_mul_elemwise_2d", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "22_mul-elemwise-2d", "nl": "linalg.mul elementwise on two 2-D f32 memrefs (2x2)", "canonical_fn_name": "me", "canonical_signature": "(memref<?x?xf32>, memref<?x?xf32>, memref<?x?xf32>) -> ()", "memref_inputs": [{"name": "a", "shape": [2, 2], "dtype": "f32", "init": "fill", "fill_value": 3.0}, {"name": "b", "shape": [2, 2], "dtype": "f32", "init": "fill", "fill_value": 4.0}, {"name": "c", "shape": [2, 2], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "c", "shape": [2, 2], "dtype": "f32"}], "expected_stdout_regex": "(12(\\.0+)?[^\\d]+){4}"}
18
+ {"id": "F18_linalg_matmul_2x2", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "02_matmul-static-2x2", "nl": "Write a function that performs matrix multiplication of two 2x2 f32 memrefs and writes the result into the output 2x2 f32 memref.", "canonical_fn_name": "mm22", "canonical_signature": "(memref<2x2xf32>, memref<2x2xf32>, memref<2x2xf32>) -> ()", "memref_inputs": [{"name": "A", "shape": [2, 2], "dtype": "f32", "init": "fill", "fill_value": 1.0, "static": true}, {"name": "B", "shape": [2, 2], "dtype": "f32", "init": "fill", "fill_value": 1.0, "static": true}, {"name": "C", "shape": [2, 2], "dtype": "f32", "init": "fill", "fill_value": 0.0, "static": true}], "memref_print": [{"name": "C", "shape": [2, 2], "dtype": "f32"}], "expected_stdout_regex": "(2(\\.0+)?[^\\d]+){4}"}
19
+ {"id": "F19_linalg_exp_elemwise", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "24_exp-elemwise", "nl": "linalg.exp elementwise on a 1-D f32 memref", "canonical_fn_name": "ee", "canonical_signature": "(memref<?xf32>, memref<?xf32>) -> ()", "memref_inputs": [{"name": "x", "shape": [4], "dtype": "f32", "init": "fill", "fill_value": 0.0}, {"name": "y", "shape": [4], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "y", "shape": [4], "dtype": "f32"}], "expected_stdout_regex": "(1(\\.0+)?[^\\d]+){4}"}
20
+ {"id": "F20_linalg_abs_elemwise", "dialect": "linalg+memref", "source_benchmark": "linalg_spec_30", "source_id": "26_abs-elemwise", "nl": "linalg.abs elementwise on a 1-D f32 memref", "canonical_fn_name": "ab", "canonical_signature": "(memref<?xf32>, memref<?xf32>) -> ()", "memref_inputs": [{"name": "x", "shape": [4], "dtype": "f32", "init": "fill", "fill_value": -2.5}, {"name": "y", "shape": [4], "dtype": "f32", "init": "alloc_only"}], "memref_print": [{"name": "y", "shape": [4], "dtype": "f32"}], "expected_stdout_regex": "(2\\.5[^\\d]+){4}"}
21
+ {"id": "F21_stablehlo_add_1d_f32", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "01_add-1d", "nl": "Write a function that adds two 1-D f32 tensors of 16 elements using stablehlo.add.", "canonical_fn_name": "a", "canonical_signature": "(tensor<16xf32>, tensor<16xf32>) -> tensor<16xf32>", "iree_inputs": ["16xf32=1.0", "16xf32=2.0"], "expected_output_pattern": "16xf32=3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3"}
22
+ {"id": "F22_stablehlo_multiply_2d", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "04_multiply-2d", "nl": "Write a function that multiplies two 4x4 f32 tensors elementwise using stablehlo.multiply.", "canonical_fn_name": "mul", "canonical_signature": "(tensor<4x4xf32>, tensor<4x4xf32>) -> tensor<4x4xf32>", "iree_inputs": ["4x4xf32=3.0", "4x4xf32=4.0"], "expected_output_pattern": "4x4xf32=\\[12 12 12 12\\]\\[12 12 12 12\\]\\[12 12 12 12\\]\\[12 12 12 12\\]"}
23
+ {"id": "F23_stablehlo_subtract_1d_i32", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "03_subtract-1d-i32", "nl": "Write a function that subtracts two 1-D i32 tensors of 16 elements using stablehlo.subtract.", "canonical_fn_name": "s", "canonical_signature": "(tensor<16xi32>, tensor<16xi32>) -> tensor<16xi32>", "iree_inputs": ["16xi32=10", "16xi32=4"], "expected_output_pattern": "16xi32=6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6"}
24
+ {"id": "F24_stablehlo_abs_f32", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "06_abs-f32", "nl": "Write a function that computes the elementwise absolute value of a 1-D f32 tensor.", "canonical_fn_name": "ab", "canonical_signature": "(tensor<16xf32>) -> tensor<16xf32>", "iree_inputs": ["16xf32=-2.5"], "expected_output_pattern": "16xf32=2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5"}
25
+ {"id": "F25_stablehlo_exp_1d", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "07_exp-1d", "nl": "Write a function that computes the elementwise exponential of a 1-D f32 tensor.", "canonical_fn_name": "ex", "canonical_signature": "(tensor<16xf32>) -> tensor<16xf32>", "iree_inputs": ["16xf32=0.0"], "expected_output_pattern": "16xf32=1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"}
26
+ {"id": "F26_stablehlo_transpose_2d", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "09_transpose-2d", "nl": "Write a function that transposes a 4x8 f32 tensor producing an 8x4 tensor.", "canonical_fn_name": "t", "canonical_signature": "(tensor<4x8xf32>) -> tensor<8x4xf32>", "iree_inputs": ["4x8xf32=1.5"], "expected_output_pattern": "8x4xf32="}
27
+ {"id": "F27_stablehlo_add_2d_dyn", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "02_add-2d-dynamic", "nl": "Write a function that adds two 2x4 f32 tensors using stablehlo.add.", "canonical_fn_name": "a2", "canonical_signature": "(tensor<2x4xf32>, tensor<2x4xf32>) -> tensor<2x4xf32>", "iree_inputs": ["2x4xf32=2.0", "2x4xf32=2.5"], "expected_output_pattern": "2x4xf32=\\[4.5 4.5 4.5 4.5\\]\\[4.5 4.5 4.5 4.5\\]"}
28
+ {"id": "F28_stablehlo_divide_f64", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "05_divide-f64", "nl": "Write a function that divides two 1-D f64 tensors of 8 elements using stablehlo.divide.", "canonical_fn_name": "d", "canonical_signature": "(tensor<8xf64>, tensor<8xf64>) -> tensor<8xf64>", "iree_inputs": ["8xf64=12.0", "8xf64=4.0"], "expected_output_pattern": "8xf64=3 3 3 3 3 3 3 3"}
29
+ {"id": "F29_stablehlo_dot_matmul", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "17_dot_general-matmul", "nl": "Write a function that performs a matmul of two f32 tensors via stablehlo.dot_general (lhs 4x8, rhs 8x4).", "canonical_fn_name": "dm", "canonical_signature": "(tensor<4x8xf32>, tensor<8x4xf32>) -> tensor<4x4xf32>", "iree_inputs": ["4x8xf32=1.0", "8x4xf32=1.0"], "expected_output_pattern": "4x4xf32=\\[8 8 8 8\\]\\[8 8 8 8\\]\\[8 8 8 8\\]\\[8 8 8 8\\]"}
30
+ {"id": "F30_stablehlo_transpose_3d", "dialect": "stablehlo", "source_benchmark": "stablehlo_spec_30", "source_id": "10_transpose-3d", "nl": "Write a function that transposes a 2x3x4 f32 tensor with permutation [2, 0, 1] producing a 4x2x3 tensor.", "canonical_fn_name": "t3", "canonical_signature": "(tensor<2x3x4xf32>) -> tensor<4x2x3xf32>", "iree_inputs": ["2x3x4xf32=2.5"], "expected_output_pattern": "4x2x3xf32="}