Skip to content
Merged
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
2 changes: 1 addition & 1 deletion reframe/core/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class DeviceInfo(_ReadOnlyInfo, jsonext.JSONSerializable):
'''

__slots__ = ()
_known_attrs = ('type', 'arch')
_known_attrs = ('type', 'arch', 'model')

@property
def info(self):
Expand Down
1 change: 1 addition & 0 deletions reframe/schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
"properties": {
"type": {"type": "string"},
"arch": {"type": "string"},
"model": {"type": "string"},
"num_devices": {"type": "number"}
}
},
Expand Down
3 changes: 2 additions & 1 deletion unittests/resources/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def hostname():
'devices': [
{
'type': 'gpu',
'arch': 'p100',
'arch': 'sm_60',
'model': 'p100',
'num_devices': 1
}
]
Expand Down
9 changes: 7 additions & 2 deletions unittests/test_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def temp_topo(tmp_path, monkeypatch):
json.dump([
{
'type': 'gpu',
'arch': 'a100',
'arch': 'sm_80',
'model': 'a100',
'num_devices': 8
}
], fp)
Expand Down Expand Up @@ -79,10 +80,14 @@ def test_autotect(default_exec_ctx):
assert len(part.devices) == 1
assert part.devices[0].info == {
'type': 'gpu',
'arch': 'a100',
'arch': 'sm_80',
'model': 'a100',
'num_devices': 8
}
assert part.devices[0].device_type == 'gpu'
assert part.devices[0].type == 'gpu'
assert part.devices[0].arch == 'sm_80'
assert part.devices[0].model == 'a100'

# Test immutability of ProcessorInfo and DeviceInfo
with pytest.raises(AttributeError):
Expand Down
8 changes: 8 additions & 0 deletions unittests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ def test_system_create(site_config):
assert partition.processor.num_numa_nodes == 1
assert partition.processor.num_cores_per_numa_node == 4

# Check device info
assert len(partition.devices) == 1
assert partition.devices[0].type == 'gpu'
assert partition.devices[0].device_type == 'gpu'
assert partition.devices[0].arch == 'sm_60'
assert partition.devices[0].model == 'p100'
assert partition.devices[0].num_devices == 1

# Select another subconfig and check that the default selection of
# container runtime is done properly
site_config.select_subconfig('testsys:login')
Expand Down