From 5a097a50be6169d2a232a9fb6a0bf0e613e9c8f8 Mon Sep 17 00:00:00 2001 From: Tom Doherty Date: Thu, 21 Nov 2024 09:53:30 +0000 Subject: [PATCH] Recognise newer AMD GPU devices --- changelog/67058.fixed.md | 1 + salt/grains/core.py | 7 ++++++- tests/pytests/unit/grains/test_core.py | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelog/67058.fixed.md diff --git a/changelog/67058.fixed.md b/changelog/67058.fixed.md new file mode 100644 index 00000000000..248e4de082a --- /dev/null +++ b/changelog/67058.fixed.md @@ -0,0 +1 @@ +Recognise newer AMD GPU devices diff --git a/salt/grains/core.py b/salt/grains/core.py index b7f99c0fa52..e033284aa87 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -286,7 +286,12 @@ def _linux_gpu_data(): "matrox", "aspeed", ] - gpu_classes = ("vga compatible controller", "3d controller", "display controller") + gpu_classes = ( + "3d controller", + "display controller", + "processing accelerators", + "vga compatible controller", + ) devs = [] try: diff --git a/tests/pytests/unit/grains/test_core.py b/tests/pytests/unit/grains/test_core.py index 73574bbd0e5..b7a53b0a546 100644 --- a/tests/pytests/unit/grains/test_core.py +++ b/tests/pytests/unit/grains/test_core.py @@ -3379,6 +3379,12 @@ def test_linux_gpus(caplog): "Vega [Radeon RX Vega]]", "amd", ], # AMD + [ + "Processing accelerators", + "Advanced Micro Devices, Inc. [AMD/ATI]", + "Device X", + "amd", + ], # AMD [ "Audio device", "Advanced Micro Devices, Inc. [AMD/ATI]",