rocm_info
Inspect ROCm installation health including driver version, amdgpu module, installed packages, and tool availability before running workloads.
Instructions
Report the rocm-smi version, kernel driver version, whether the amdgpu module is loaded, installed ROCm/HIP/HSA packages (from dpkg), and whether amdgpu_top is available. Useful for checking ROCm install health before running workloads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:316-350 (handler)The rocmInfo() async function that implements the tool logic: checks if rocm-smi and amdgpu_top are installed, retrieves rocm-smi version and driver version, checks if amdgpu kernel module is loaded, and lists installed ROCm/HIP/HSA packages via dpkg. Returns a text result with all the gathered info.
async function rocmInfo() { const info = { rocm_smi_installed: !!BIN.rocmSmi, rocm_smi_path: BIN.rocmSmi, amdgpu_top_installed: !!BIN.amdgpuTop, amdgpu_top_path: BIN.amdgpuTop, }; if (BIN.rocmSmi) { const v = await run(BIN.rocmSmi, ['--version']); info.rocm_smi_version = (v.stdout || v.stderr || '').trim().split('\n').slice(0, 3).join(' | ') || null; const d = parseRocmJson((await run(BIN.rocmSmi, ['--showdriverversion', '--json'])).stdout); info.driver_version = d && d.system ? d.system['Driver version'] : null; } if (BIN.lsmod) { const m = await run(BIN.lsmod); info.amdgpu_loaded = /^amdgpu\s/m.test(m.stdout || ''); } if (BIN.dpkg) { const p = await run(BIN.dpkg, ['-l']); const pkgs = (p.stdout || '').split('\n') .filter((l) => /^ii\s+(rocm|hip|hsa|amdgpu)/i.test(l)) .map((l) => { const parts = l.split(/\s+/); return { name: parts[1], version: parts[2] }; }); info.rocm_packages = pkgs; info.rocm_packages_count = pkgs.length; } return textResult(info); } - server.js:387-392 (schema)The tool registration entry in the TOOLS array, providing the name 'rocm_info', a description of what it reports, and an empty inputSchema (no parameters).
{ name: 'rocm_info', description: 'Report the rocm-smi version, kernel driver version, whether the amdgpu module is loaded, installed ROCm/HIP/HSA packages (from dpkg), and whether amdgpu_top is available. Useful for checking ROCm install health before running workloads.', annotations: { title: 'ROCm install info', readOnlyHint: true, destructiveHint: false, openWorldHint: false }, inputSchema: { type: 'object', properties: {}, additionalProperties: false }, }, - server.js:395-401 (registration)The HANDLERS mapping that connects the 'rocm_info' tool name to the rocmInfo function for dispatch.
const HANDLERS = { gpu_status: gpuStatus, gpu_metrics: gpuMetrics, gpu_processes: gpuProcesses, gpu_watch: gpuWatch, rocm_info: rocmInfo, };