Skip to content

Commit 6f9f342

Browse files
tojiDawn LUCI CQ
authored andcommitted
Update gpu_info.json with new GPUs
Change-Id: Ia8f926927a80e06f859fe083e9a7d17e91eac864 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/206081 Reviewed-by: Kai Ninomiya <[email protected]> Commit-Queue: Brandon Jones <[email protected]>
1 parent 710ed0c commit 6f9f342

File tree

2 files changed

+95
-19
lines changed

2 files changed

+95
-19
lines changed

src/dawn/gpu_info.json

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,17 @@
9292
"id": "0x1002",
9393

9494
"devices": [{
95-
"mask": "0xFF00",
96-
"architecture": {
97-
"GCN 2": ["0x1300"],
98-
"GCN 5": ["0x1500", "0x1600"],
99-
"RDNA 2": ["0x7400"]
100-
}
101-
}, {
10295
"mask": "0xFFF0",
10396
"architecture": {
104-
"GCN 1": ["0x6600", "0x6610", "0x6660", "0x6790", "0x6800", "0x6810", "0x6820", "0x6830"],
97+
"GCN 1": ["0x1300", "0x1310", "0x6600", "0x6610", "0x6660", "0x6790", "0x6800", "0x6810", "0x6820", "0x6830"],
10598
"GCN 2": ["0x6640", "0x6650", "0x67A0", "0x67B0", "0x9830", "0x9850"],
10699
"GCN 3": ["0x6900", "0x6920", "0x6930", "0x7300", "0x9870", "0x98E0"],
107-
"GCN 4": ["0x67C0", "0x67D0", "0x67E0", "0x67F0", "0x6980", "0x6990", "0x6FD0"],
108-
"GCN 5": ["0x66A0", "0x6860", "0x6870", "0x6940", "0x69A0"],
100+
"GCN 4": ["0x67C0", "0x67D0", "0x67E0", "0x67F0", "0x6980", "0x6990", "0x6FD0", "0x9920"],
101+
"GCN 5": ["0x66A0", "0x6860", "0x6870", "0x6940", "0x69A0", "0x15D0", "0x1630"],
109102
"RDNA 1": ["0x7310", "0x7340", "0x7360"],
110-
"RDNA 2": ["0x73A0", "0x73B0", "0x73D0", "0x73E0", "0x73F0"]
103+
"RDNA 2": ["0x73A0", "0x73B0", "0x73D0", "0x73E0", "0x73F0", "0x7400", "0x7420", "0x7430", "0x1430", "0x1500", "0x15E0", "0x1640", "0x1680"],
104+
"RDNA 3": ["0x7440", "0x7470", "0x7480", "0x15B0"],
105+
"CDNA 1": ["0x7380"]
111106
}
112107
}]
113108
},
@@ -138,7 +133,26 @@
138133

139134
"Midgard": ["0x00000000"],
140135
"Bifrost": ["0x60000000", "0x70000000"],
141-
"Valhall": ["0x90000000", "0xA0000000", "0xB0000000"]
136+
"Valhall": ["0x90000000", "0xA0000000", "0xB0000000"],
137+
"Gen 5": ["0xC0000000"]
138+
}
139+
}]
140+
},
141+
142+
"Broadcom": {
143+
"id": "0x14e4",
144+
145+
"devices": [{
146+
"mask": "0x00000000",
147+
"architecture": {
148+
"_comment": [
149+
"The Broadcom GPUs are rare (used by Raspberry Pi and similar low-power devices) and",
150+
"have device IDs that are all over place, so they're all going to get lumped into a",
151+
"single 'VideoCore' architecture unless someone comes up with a better way to break",
152+
"them down."
153+
],
154+
155+
"VideoCore": ["0x00000000"]
142156
}
143157
}]
144158
},
@@ -154,7 +168,16 @@
154168
},
155169

156170
"Img Tec": {
157-
"id": "0x1010"
171+
"id": "0x1010",
172+
173+
"devices": [{
174+
"mask": "0xFF000000",
175+
"architecture": {
176+
"Rogue": ["0x00000000", "0x22000000", "0x24000000"],
177+
"Furian": ["0x1b000000"],
178+
"Albiorix": ["0x35000000", "0x36000000"]
179+
}
180+
}]
158181
},
159182

160183
"Intel": {
@@ -165,8 +188,8 @@
165188
"architecture": {
166189
"Gen 7": ["0x0100", "0x0400", "0x0A00", "0x0D00", "0x0F00"],
167190
"Gen 8": ["0x1600", "0x2200"],
168-
"Gen 9": ["0x1900", "0x3100", "0x3E00", "0x5A00", "0x5900", "0x9B00"],
169-
"Gen 11": ["0x8A00", "0x4E00"],
191+
"Gen 9": ["0x1900", "0x3100", "0x3E00", "0x5A00", "0x5900", "0x8700", "0x9B00"],
192+
"Gen 11": ["0x8A00", "0x4E00", "0x9800"],
170193
"Gen 12 LP": ["0x4600", "0x4C00", "0x4900", "0x9A00", "0xA700", "0x7D00"],
171194
"Gen 12 HP": ["0x4F00", "0x5600"],
172195
"Gen 13 LP": ["0x6400"],
@@ -206,7 +229,7 @@
206229
"Maxwell": ["0x1300", "0x1400", "0x1600", "0x1700"],
207230
"Pascal": ["0x1500", "0x1B00", "0x1C00", "0x1D00"],
208231
"Turing": ["0x1E00", "0x1F00", "0x2100"],
209-
"Ampere": ["0x2200", "0x2400", "0x2500"],
232+
"Ampere": ["0x2200", "0x2400", "0x2500", "0x2000"],
210233
"Lovelace": ["0x2600", "0x2700", "0x2800"]
211234
}
212235
}, {
@@ -215,7 +238,9 @@
215238
"architecture": {
216239
"Kepler": ["0x1e000000"],
217240
"Maxwell": ["0x92000000"],
218-
"Pascal": ["0x93000000"]
241+
"Pascal": ["0x93000000"],
242+
"Ampere": ["0x97000000"],
243+
"Volta": ["0xa5000000"]
219244
}
220245
}]
221246
},
@@ -237,15 +262,29 @@
237262

238263
"Qualcomm_ACPI": {
239264
"name_override": "Qualcomm",
240-
"id": "0x4D4F4351"
265+
"id": "0x4D4F4351",
266+
267+
"devices": [{
268+
"mask": "0xFF000000",
269+
"architecture": {
270+
"Adreno 8xx": ["0x36000000"]
271+
}
272+
}]
273+
241274
},
242275

243276
"Samsung": {
244277
"id": "0x144d",
245278

246279
"devices": [{
280+
"_comment": [
281+
"Haven't seen enough of these to determine a good masking pattern, so just using full",
282+
"device IDs of known devices in the meantime."
283+
],
284+
"mask": "0xFFFFFFFF",
247285
"architecture": {
248-
"RDNA 2": ["0x73A0"]
286+
"RDNA 2": ["0x000073A0", "0x01300100"],
287+
"RDNA 3": ["0x02600200"]
249288
}
250289
}]
251290
}

src/dawn/updating_gpu_info.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Updating gpu_info.json
2+
3+
Dawn uses `gpu_info.json` to group GPUs by vendor and architecture when calling `adapter.info`. It uses
4+
vendor and masked PCI device IDs to identify the GPUs, and as such will need to be updated from time to time as new
5+
devices come on the market.
6+
7+
## Guidelines for adding a new device or set of devices
8+
9+
There are no automated processes to add devices to `gpu_info.json`. Everything is inserted by hand. Fortunately the
10+
file is intended to be human readable, and should be relatively easy to update following the comments at the top of the
11+
file and referencing the existing entries.
12+
13+
When adding new devices use of a `mask` is encouraged when applicable to capture more devices with less entries.
14+
However, it's important to ensure that the masked device IDs are not overly broad or capture devices which do not belong
15+
to a given architecture. Many GPU vendors do not use very consistent patterns in their IDs, or have strange exceptions
16+
to the patterns that do exist.
17+
18+
When in doubt, prefer adding an explicit device ID without a `mask` over adding an masked ID that might accidentally
19+
capture more devices than intended.
20+
21+
A GPUs `architecture` should be the vendor's terminology for a given family of devices when possible. An `architecture`
22+
group should not be detailed enough to identify specific devices, but should ideally group all devices made within a
23+
span of a couple of years or longer. It is OK to have significant performance disparities between devices in a single
24+
`architecture` group, as long as the capabilities and behavior of the devices are roughly similar.
25+
26+
## Rolling new devices
27+
28+
Capturing new devices that need to be added to `gpu_info.json` right now is unfortunately a fairly awkward process. The
29+
method used so far has been to checkout https://github.com/kainino0x/gpuinfo-vulkan-query, update the data submodule
30+
with the latest records from https://gpuinfo.org using the script at https://github.com/kainino0x/gpuinfo-vulkan-slurp
31+
(Ask kainino@ or bajones@ for access), and then run `device_id.py` with the path to the `gpu_info.json` file you are
32+
updating. That script will compare all the records to the entries in `gpu_info.json` and print out how each of them are
33+
categorized followed by a list of all the uncategorized device IDs and descriptions sorted by vendor. You'll have to
34+
manually look at the device descriptions and research their architectural design in order to categorize them.
35+
36+
Good luck!
37+

0 commit comments

Comments
 (0)