diff --git a/examples/hardware_advisor_agent.py b/examples/hardware_advisor_agent.py index 1fed242ef..9439c488a 100644 --- a/examples/hardware_advisor_agent.py +++ b/examples/hardware_advisor_agent.py @@ -143,7 +143,7 @@ def get_hardware_info() -> Dict[str, Any]: # Get NPU information from Lemonade devices = info.get("devices", {}) - npu_info = devices.get("npu", {}) + npu_info = devices.get("amd_npu", {}) npu_available = npu_info.get("available", False) npu_name = ( npu_info.get("name", "Not detected") @@ -156,13 +156,13 @@ def get_hardware_info() -> Dict[str, Any]: "os": info.get("OS Version", "Unknown"), "processor": info.get("Processor", "Unknown"), "ram_gb": ram_gb, - "gpu": { + "amd_igpu": { "name": gpu_name, "memory_mb": gpu_memory_mb, "memory_gb": gpu_memory_gb, "available": gpu_available, }, - "npu": {"name": npu_name, "available": npu_available}, + "amd_npu": {"name": npu_name, "available": npu_available}, } except Exception as e: return { diff --git a/src/gaia/llm/lemonade_client.py b/src/gaia/llm/lemonade_client.py index e53e1f56c..5afd6d70c 100644 --- a/src/gaia/llm/lemonade_client.py +++ b/src/gaia/llm/lemonade_client.py @@ -2679,8 +2679,9 @@ def get_system_info(self, verbose: bool = False) -> Dict[str, Any]: - Physical Memory (RAM) - devices: Dictionary with device information - cpu: Name, cores, threads, availability - - gpu: AMD iGPU/dGPU name, memory (MB), driver version, availability - - npu: Name, driver version, power mode, availability + - amd_igpu: AMD integrated GPU name, VRAM, driver version, availability + - amd_dgpu: AMD discrete GPU list + - amd_npu: AMD NPU name, driver version, power mode, availability Examples: # Check available devices @@ -2688,10 +2689,10 @@ def get_system_info(self, verbose: bool = False) -> Dict[str, Any]: devices = sysinfo.get("devices", {}) # Select best device - if devices.get("npu", {}).get("available"): + if devices.get("amd_npu", {}).get("available"): print("Using NPU for acceleration") - elif devices.get("gpu", {}).get("available"): - print("Using GPU for acceleration") + elif devices.get("amd_igpu", {}).get("available"): + print("Using iGPU for acceleration") else: print("Using CPU") diff --git a/tests/test_hardware_advisor_agent.py b/tests/test_hardware_advisor_agent.py index 1dd70d684..ed4d58d0b 100644 --- a/tests/test_hardware_advisor_agent.py +++ b/tests/test_hardware_advisor_agent.py @@ -30,7 +30,7 @@ def mock_lemonade_client(self): "Processor": "AMD Ryzen 9 7940HS", "Physical Memory": "32.0 GB", "devices": { - "npu": {"available": True, "name": "AMD Ryzen AI NPU"}, + "amd_npu": {"available": True, "name": "AMD Ryzen AI NPU"}, }, } mock_client.list_models.return_value = { @@ -92,8 +92,8 @@ def test_get_hardware_info_returns_success(self, agent, mock_lemonade_client): assert result["success"] is True assert "ram_gb" in result - assert "gpu" in result - assert "npu" in result + assert "amd_igpu" in result + assert "amd_npu" in result assert result["ram_gb"] == 32.0 def test_list_available_models_returns_success(self, agent, mock_lemonade_client): @@ -134,7 +134,9 @@ def mock_lemonade_client(self): "OS Version": "Linux", "Processor": "AMD", "Physical Memory": "64.0 GB", - "devices": {"npu": {"available": True, "name": "Test NPU"}}, + "devices": { + "amd_npu": {"available": True, "name": "Test NPU"}, + }, } mock_client.list_models.return_value = { "data": [ @@ -171,8 +173,8 @@ def test_get_hardware_info_includes_all_components(self, agent): assert "os" in result assert "processor" in result assert "ram_gb" in result - assert "gpu" in result - assert "npu" in result + assert "amd_igpu" in result + assert "amd_npu" in result def test_recommend_models_respects_memory_constraints(self, agent): """Test recommend_models filters by available RAM."""