Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ jobs:
run: |
check-jsonschema --schemafile cpu/microarchitectures_schema.json cpu/microarchitectures.json
check-jsonschema --schemafile cpu/cpuid_schema.json cpu/cpuid.json
check-jsonschema --schemafile gpu/detection_schema.json gpu/detection.json
- name: Check JSON file formatting
run: |
diff cpu/microarchitectures_schema.json <(jq . cpu/microarchitectures_schema.json)
diff cpu/cpuid_schema.json <(jq . cpu/cpuid_schema.json)

diff cpu/microarchitectures.json <(jq . cpu/microarchitectures.json)
diff cpu/cpuid.json <(jq . cpu/cpuid.json)

diff gpu/detection_schema.json <(jq . gpu/detection_schema.json)
diff gpu/detection.json <(jq . gpu/detection.json)
12 changes: 12 additions & 0 deletions gpu/detection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"vendors": {
"0x10de": "nvidia",
"0x1002": "amd",
"0x8086": "intel"
},
"pci_classes": [
"0x030000",
"0x030200",
"0x120000"
]
}
30 changes: 30 additions & 0 deletions gpu/detection_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Schema for GPU detection data: PCI vendor IDs and GPU PCI class codes",
"type": "object",
"additionalProperties": false,
"required": [
"vendors",
"pci_classes"
],
"properties": {
"vendors": {
"description": "Mapping from PCI vendor IDs to vendor names",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^0x[0-9a-f]{4}$": {
"type": "string"
}
}
},
"pci_classes": {
"description": "PCI class codes that identify GPU devices",
"type": "array",
"items": {
"type": "string",
"pattern": "^0x[0-9a-f]{6}$"
}
}
}
}