Add GPU PCI ID fallback names and container passthrough indicators
This commit is contained in:
@@ -329,20 +329,24 @@
|
||||
<!-- GPUs -->
|
||||
{% set gpus = d.get('gpu', []) if d.get('gpu') else [] %}
|
||||
{% if gpus or nvidia_gpus or intel_gpus %}
|
||||
{% set gpu_pt = d|gpu_passthrough_map %}
|
||||
<div class="detail-section">
|
||||
<h4>GPUs</h4>
|
||||
<table>
|
||||
{% for ng in nvidia_gpus %}
|
||||
{% set pt_users = gpu_pt.get(ng.get('pci_address', '')|normalize_pci) %}
|
||||
<tr>
|
||||
<td>{{ ng.get('name', 'NVIDIA GPU ' ~ loop.index0) }}</td>
|
||||
<td>{{ ng.get('name', 'NVIDIA GPU ' ~ loop.index0) }}{% if pt_users %} <span class="gpu-passthrough">→ {{ pt_users|join(', ') }}</span>{% endif %}</td>
|
||||
<td>{{ ng.get('utilization_percent', '-') }}%</td>
|
||||
<td>{{ ng.get('memory_used_mb', '-') }} / {{ ng.get('memory_total_mb', '-') }} MB</td>
|
||||
<td>{{ ng.get('temperature', '-') }}°C</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for ig in intel_gpus %}
|
||||
{% set ig_name = ig.get('name', '')|clean_gpu if ig.get('name') else 'Intel GPU ' ~ loop.index0 %}
|
||||
{% set pt_users = gpu_pt.get(ig.get('pci_address', '')|normalize_pci) %}
|
||||
<tr>
|
||||
<td>Intel GPU {{ loop.index0 }}</td>
|
||||
<td>{{ ig_name }}{% if pt_users %} <span class="gpu-passthrough">→ {{ pt_users|join(', ') }}</span>{% endif %}</td>
|
||||
<td>{{ ig.get('utilization_percent', '-') }}%</td>
|
||||
<td>{% if ig.get('frequency_mhz') %}{{ ig.get('frequency_mhz') }} MHz{% else %}-{% endif %}</td>
|
||||
<td>{% if ig.get('power_w') %}{{ ig.get('power_w') }} W{% else %}-{% endif %}</td>
|
||||
@@ -350,7 +354,8 @@
|
||||
{% endfor %}
|
||||
{% if not nvidia_gpus and not intel_gpus %}
|
||||
{% for gpu in gpus %}
|
||||
<tr><td colspan="4">{{ gpu.get('description', '-')|clean_gpu }}</td></tr>
|
||||
{% set pt_users = gpu_pt.get(gpu.get('pci_address', '')|normalize_pci) %}
|
||||
<tr><td colspan="4">{{ gpu.get('description', '-')|clean_gpu }}{% if pt_users %} <span class="gpu-passthrough">→ {{ pt_users|join(', ') }}</span>{% endif %}</td></tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user