Skip to content

Commit 2e8a1c7

Browse files
committed
Add SVE and FP16 variants
1 parent 4c539f1 commit 2e8a1c7

File tree

4 files changed

+31133
-51
lines changed

4 files changed

+31133
-51
lines changed

codesize.html

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
55
<title>AArch64 Cost model tests</title>
66
<script>
7-
document.addEventListener("DOMContentLoaded", function() {
8-
fetch("data-int.json")
9-
.then(response => response.json())
10-
.then(json => drawTable(json, 'int'))
11-
.catch(reason => console.log(reason));
12-
fetch("data-fp.json")
13-
.then(response => response.json())
14-
.then(json => drawTable(json, 'fp'))
15-
.catch(reason => console.log(reason));
16-
fetch("data-cast.json")
17-
.then(response => response.json())
18-
.then(json => drawTable(json, 'cast'))
19-
.catch(reason => console.log(reason));
20-
fetch("data-vec.json")
21-
.then(response => response.json())
22-
.then(json => drawTable(json, 'vec'))
7+
function load(label, type) {
8+
fetch("data-" + label + type + ".json")
9+
.then(response => {
10+
if (!response.ok) {
11+
fetch("data-" + label + ".json")
12+
.then(reposonse => reposonse.json())
13+
.then(json => drawTable(json, label))
14+
.catch(reason => console.log(reason));
15+
return Promise.reject()
16+
}
17+
return response.json()
18+
})
19+
.then(json => drawTable(json, label))
2320
.catch(reason => console.log(reason));
21+
}
22+
23+
function reload(type) {
24+
load("int", type)
25+
load("fp", type)
26+
load("cast", type)
27+
load("vec", type)
28+
}
29+
30+
document.addEventListener("DOMContentLoaded", function() {
31+
reload('')
2432
});
2533

2634
function drawTable(json, label) {
@@ -34,7 +42,7 @@
3442
tys.push(j.ty);
3543
});
3644

37-
var table = document.getElementById('table-'+label)
45+
const table = document.getElementById('table-'+label)
3846
while (table.childNodes.length != 0)
3947
table.removeChild(table.childNodes[0]);
4048

@@ -125,12 +133,20 @@
125133
code {
126134
font-family: Consolas,"courier new";
127135
}
136+
button:focus {
137+
background: #c3c3c3;
138+
}
128139
</style>
129140
</head>
130141
<body>
131142
<h1>Cost model tests</h1>
132143
<p>This attempts to compare the first-order output of the cost model compared to the measured codesize. It generates simple snippets of IR and compares the output of opt -passes=print<cost-model> -cost-kind=codesize and the assembly generated from llc. The assembly output of llc is sometimes filtered to remove loop invariant instructions.</p>
133144
<p>The table lists the difference between the two cost models (i.e. zero is good). Not all the scores are expected to match exactly. More details and the costs can be found by clicking on a table entry.</p>
145+
<div style="display: flex border=10px;">
146+
<button onclick="reload('')">Base</button>
147+
<button onclick="reload('-fullfp16')">FP16</button>
148+
<button onclick="reload('-sve2')">SVE</button>
149+
</div>
134150
<h3>Integer diffs</h3>
135151
<div style="display: flex;">
136152
<div width="60%" style="flex: 0 0 60%;"><table id="table-int" class="dataframe" border="1"><th>Loading</th></table></div>

0 commit comments

Comments
 (0)