Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi GPU support #52

Open
wants to merge 80 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
5416982
Add new dashboard Layout for 6.12
SimonFair Feb 10, 2023
6eba3fa
Update AMD panel and Intel to iGPU/GPU
SimonFair Feb 10, 2023
a51e092
Update gpustatusmovable.page
SimonFair Feb 11, 2023
9ace0cb
Show real model
SimonFair Feb 11, 2023
67ee690
Fix clock and mem load bars
SimonFair Feb 14, 2023
3522fda
Merge pull request #2 from SimonFair/6.12-Dashboard
SimonFair Feb 14, 2023
15c0012
Release 2023.02.14
SimonFair Feb 14, 2023
a55858a
Update gpustat.plg
SimonFair Feb 14, 2023
40ecee2
Return to Dashboard from Settings when done.
SimonFair Feb 14, 2023
fe96770
Multi GPU Support initial
SimonFair Feb 19, 2023
fefc530
Release 2023.02.19
SimonFair Feb 19, 2023
831a5c9
Merge branch 'master' into Multi-GPU-Support-
SimonFair Feb 19, 2023
91d3412
Merge pull request #3 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
2734ef0
Pre 6.12 fixes/Code cleanup
SimonFair Feb 19, 2023
0a0e5a1
Merge branch 'Multi-GPU-Support-' of https://github.com/SimonFair/gpu…
SimonFair Feb 19, 2023
c2d70b4
Merge pull request #4 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
1afa081
Release 2023.02.19a
SimonFair Feb 19, 2023
b48f424
Additional updates fixes
SimonFair Feb 19, 2023
1498245
Merge pull request #5 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
c5042c6
Release 2023.02.19b
SimonFair Feb 19, 2023
c3bb05b
Delete gpustatusmovable.page
SimonFair Feb 19, 2023
920eb2e
Merge pull request #6 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
095f66f
Release 2023.02.19c
SimonFair Feb 19, 2023
ece840a
Update gpustat.plg
SimonFair Feb 19, 2023
c8ade85
Update gpustat.plg
SimonFair Feb 19, 2023
21693a1
Fix getting Model.
SimonFair Feb 19, 2023
e8305f6
Merge branch 'Multi-GPU-Support-' of https://github.com/SimonFair/gpu…
SimonFair Feb 19, 2023
d9eeeb4
Remove packages.
SimonFair Feb 19, 2023
ac6e5b7
Delete GPUStatSettings.page.old
SimonFair Feb 19, 2023
b1e2366
Merge pull request #7 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
d4f130b
Release 2023.02.19
SimonFair Feb 19, 2023
20ac436
Release 2023.02.19d
SimonFair Feb 19, 2023
97c2407
Fix Refresh
SimonFair Feb 19, 2023
88e65aa
Merge pull request #8 from SimonFair/Multi-GPU-Support-
SimonFair Feb 19, 2023
49c4adf
Release 2023.02.19e
SimonFair Feb 19, 2023
45dc6b2
Update gpustat.plg
SimonFair Feb 19, 2023
6c2e260
Code tidy + fixes
SimonFair Feb 20, 2023
a01c181
Merge pull request #9 from SimonFair/Multi-GPU-Support-
SimonFair Feb 20, 2023
db5ac97
Release 2023.02.20
SimonFair Feb 20, 2023
9f821ea
Remove redundant echoJson function.
SimonFair Feb 20, 2023
b8a59dd
Fix title
SimonFair Feb 20, 2023
6476b20
Use maximum of power GPU or power Package for power
SimonFair Feb 21, 2023
3a6ec40
Merge pull request #10 from SimonFair/Multi-GPU-Support-
SimonFair Feb 21, 2023
a666f81
Release 2023.02.21
SimonFair Feb 21, 2023
38cf2f1
Add option of power draw selection for Intel.
SimonFair Feb 21, 2023
700fa04
Merge pull request #11 from SimonFair/Multi-GPU-Support-
SimonFair Feb 21, 2023
fffc1a6
Release 2023.02.21a
SimonFair Feb 21, 2023
0e6cb2a
Change Icons on Intel Panel.
SimonFair Feb 25, 2023
e6a791e
Merge pull request #12 from SimonFair/Multi-GPU-Support-
SimonFair Feb 25, 2023
88e7e57
Releae 2023.02.25
SimonFair Feb 25, 2023
0f4c3cd
Only show GPU + number if more than one GPU selected.
SimonFair Feb 25, 2023
4230d7b
Fix removal of all GPUs + update text and codetidy
SimonFair Mar 21, 2023
63ff224
Merge pull request #13 from SimonFair/Multi-GPU-Support-
SimonFair Mar 21, 2023
0e52d27
Release 2023.03.21
SimonFair Mar 21, 2023
87fb742
Fix Text.
SimonFair Mar 21, 2023
5e6efde
Merge pull request #14 from SimonFair/Multi-GPU-Support-
SimonFair Mar 21, 2023
aa0542e
Release 2023.03.21a
SimonFair Mar 21, 2023
7b0c419
Update Defaults
SimonFair Mar 21, 2023
4ea89e9
Merge pull request #15 from SimonFair/Multi-GPU-Support-
SimonFair Mar 21, 2023
aa7326b
Release 2023.03.21b
SimonFair Mar 21, 2023
07f8736
Update gpustatusmovablemulti.page
SimonFair Mar 22, 2023
817e9d9
Merge pull request #16 from SimonFair/Multi-GPU-Support-
SimonFair Mar 22, 2023
5cc63c6
Update gpustatusmovablemulti.page
SimonFair Mar 26, 2023
4e4055e
Merge pull request #17 from SimonFair/Multi-GPU-Support-
SimonFair Mar 26, 2023
798fbc0
Fix Apply for multi language.
SimonFair Mar 27, 2023
f66f0a2
Merge pull request #18 from SimonFair/Multi-GPU-Support-
SimonFair Mar 27, 2023
c200a7a
release 2023.03.27
SimonFair Mar 27, 2023
e2b220e
Support iGPU called Display Controller
SimonFair Apr 12, 2023
7195412
Merge pull request #19 from SimonFair/Multi-GPU-Support-
SimonFair Apr 12, 2023
a69d7e2
Release 2023.04.12
SimonFair Apr 12, 2023
ca64c5e
Update Intel.php
SimonFair Apr 12, 2023
93bb929
Merge pull request #20 from SimonFair/Multi-GPU-Support-
SimonFair Apr 12, 2023
aad9d8a
Release 2023.04.12a
SimonFair Apr 12, 2023
eb7f326
Update default.cfg
SimonFair May 1, 2023
7db6087
Release 2023.05.01
SimonFair May 1, 2023
2e2f172
Fix location issue when moving panels.
SimonFair Jun 9, 2023
d2a0deb
Release 2023.06.09
SimonFair Jun 9, 2023
4b5437f
Update gpustatusmovablemulti.page
SimonFair Jun 9, 2023
23545d4
Fixes for new NV Driver changes
SimonFair Jun 10, 2023
8405cd4
Merge branch 'master' into Multi-GPU-Support-
SimonFair Jun 10, 2023
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
Next Next commit
Add new dashboard Layout for 6.12
Add support for both Intel iGPU and DG2.
SimonFair committed Feb 10, 2023
commit 5416982c28d1ecb9a7f95ee6ef2324b0f4870c9b
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Menu="Dashboard"
Icon="gpustat.png"
Cond="version_compare(parse_ini_file('/etc/unraid-version')['version'],'6.12.0-beta6', '<')"
---
<?php
/*
356 changes: 356 additions & 0 deletions src/gpustat/usr/local/emhttp/plugins/gpustat/gpustatusmovable.page
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
Menu="Dashboard:0"
Icon="gpustat.png"
Cond="version_compare(parse_ini_file('/etc/unraid-version')['version'],'6.12.0-beta5', '>')"
---
<?php
/*
MIT License

Copyright (c) 2020-2022 b3rs3rk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/


/*
Create a .page file based on this example file and store the file in your plugin directory
Make sure this file has a unique name not used by the GUI or other plugins

This is an example configuration which is used to add custom tiles to the dashboard
Placement of one or more custom tiles is done under column1, column2 or column3
A column can have as many new custom tiles as needed, each custom tile is a <tbody> element
Each tile must have these two properties set:

"_(description)_" - this is the (translated) description shown in the Content Manager window
"_(Tile tile)_" - this is the (translated) title of the tile shown in bold on the screen

The content of the tile can be any text as required by your plugin, this content is placed inside the <td> element
A number of predefined spans are available to make fields of certain widths and maybe used to follow the GUI alignment
These are:
<span class="w18">
<span class="w26">
<span class="w36">
<span class="w44">
<span class="w72">
*/

$pluginname = "gpustat"; // substitute this entry with the name of your plugin

$gpustat_cfg = parse_plugin_cfg('gpustat', true);

$gpu_nv = $gpu_intel = $gpu_amd = $gpu_unknown = false;

$apps = [
'plex', 'jellyfin', 'handbrake', 'emby', 'tdarr', 'unmanic', 'dizquetv', 'ersatztv',
'fileflows', 'frigate', 'deepstack', 'nsfminer', 'shinobipro', 'foldinghome',
];

switch ($gpustat_cfg['VENDOR']) {
case "nvidia":
$gpu_nv = true;
break;
case "intel":
$gpu_intel = true;
break;
case "amd":
$gpu_amd = true;
break;
default:
// If vendor isn't set the config hasn't been saved, don't render the plugin
$gpu_unknown = true;
$unknown_msg = "Default vendor set - Change vendor in GPUStat settings page and apply.";
}


$stats = "<div class='section'>_(GPU)_<br><span><i class='ups fa fa-line-chart'></i><span id='load'>Load: <span class='gpu-util'></span></span>" ;
if ($gpu_nv || $gpu_amd) {
if ($gpustat_cfg['DISPTEMP']) $stats .= "<span > Temperature: <span class='gpu-temp'></span></span>" ;
}
if ($gpu_nv && $gpustat_cfg['DISPSESSIONS']) $stats .="<span> Processes: <span class='gpu-sessions'></span></span>";
$stats .= "<br><br></div>" ;



$mytiles[$pluginname]['column1'] =
<<<EOT
<tbody id="tblGPUDash" title="_(GPU Stats)_">
<tr><td><i class='icon-hardware f32'></i>
$stats
<a href="/Settings/GPUStatSettings" title="_(Go to GPU Statistics settings)_"><i class="fa fa-fw fa-cog control"></i></a></td></tr>
<tr class="header"><td><span class="w18">_(Vendor)_</span><span class="w44">_(Device)_</span></td></tr>'
</tbody>
EOT;




?>
<style type="text/css">
@import url("/plugins/gpustat/css/style.css");
</style>

<script>

function GPUList() {


$('#tblGPUDash').find('tr.updated').remove();

$('#tblGPUDash').append('<tr class="updated"><td>'+

"<span class='gpu-vendor w18'></span>&nbsp;<span class='gpu-name w18'></span>" +

// No GPU Set

<?php if ($gpu_unknown) : ?> "<tr><td><span>" + _("Default vendor set - Change vendor in GPUStat settings page and apply.")_ + "</span></td>/tr>" +

<?php else : ?>

// Nvidia GPUs

<?php if ($gpu_nv) : ?>
<?php if($gpustat_cfg['DISPPCIUTIL']) : ?>
"&emsp;&ensp;<span id='gpu-pciegen'>PCIe Gen (Max): <span class='gpu-pciegen'></span>&nbsp;(<span class='gpu-pciegenmax'></span>)</span>" +
"&emsp;&ensp;<span id='gpu-pciewidth'>Lanes (Max): <span class='gpu-pciewidth'></span>&nbsp;(<span class='gpu-pciewidthmax'></span>)</span>" +
<?php endif; ?>


<?php if ($gpu_nv) : ?>
"<tr><td><span class='w36'><i class='ups fa fa-fw icon-ram'></i>_(Load - Memory)_</span>" +
"<span class='w26'><span class='gpu-util load''>0%</span><div class='usage-disk sys'><span class='gpu-utilbar' id='gpu-utilbar'></span><span></span></div></span>" +

<?php if($gpustat_cfg['DISPMEMUTIL']) : ?>
"<span class='w26'><span class='gpu-memutil load''>0%</span><div class='usage-disk sys'><span class='gpu-memutilbar' id='gpu-memutilbar'></span><span></span></div></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPENCDEC']) : ?>
"<tr><td><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Encoder - Decoder)_</span>" +
"<span class='w26'><span class='gpu-encutil load''>0%</span><div class='usage-disk sys'><span class='gpu-encutilbar' id='gpu-encutilbar'></span><span></span></div></span>" +
"<span class='w26'><span class='gpu-decutil load''>0%</span><div class='usage-disk sys'><span class='gpu-decutilbar' id='gpu-decutilbar'></span><span></span></div></span>" +
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPCLOCKS']) : ?>
"<tr><td><span class='w36'><i class='ups fa fa-fw icon-ram'></i>_(GPU - Memory (MHz))_</span>" +
"<span class='w26'><span class='gpu-clock load''>0%</span><div class='usage-disk sys'><span class='gpu-clockbar' id='gpu-clockbar'></span><span></span></div></span>" +
"<span class='w26'><span class='gpu-decutil load''>0%</span><div class='usage-disk sys'><span class='gpu-memclockbar' id='gpu-memclockbar'></span><span></span></div></span>" +
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPFAN'] || $gpustat_cfg['DISPPWRDRAW']) : ?>
"<tr><td><span class='w36'><i class='ups fa fa-fw icon-fan'></i>_(Fan - Power)_</span>" +
<?php if($gpustat_cfg['DISPFAN']) : ?>
"<span class='w26'><span class='gpu-fan load''>0%</span><div class='usage-disk sys'><span class='gpu-fanbar' id='gpu-fanbar'></span><span></span></div></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPPWRDRAW']) : ?>
"<span class='w26'><span class='gpu-power load''>0%</span><div class='usage-disk sys'><span class='gpu-powerbar' id='gpu-powerbar'></span><span></span></div></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPPCIUTIL']) : ?>
"<tr><td><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(PCI Bus Rx/Tx (MB/s))_</span>" +
"<span class='w26'><span class='gpu-rxutil load''>0%</span><div class='usage-disk sys'><span class='gpu-rxutilbar' id='gpu-rxutilbar'></span><span></span></div></span>" +
"<span class='w26'><span class='gpu-txutil load''>0%</span><div class='usage-disk sys'><span class='gpu-rxutilbar' id='gpu-txutilbar'></span><span></span></div></span>" +
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPTHROTTLE'] || $gpustat_cfg['DISPPWRSTATE']): ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Power State - Throttling)_" +
<?php if($gpustat_cfg['DISPPWRSTATE']) : ?>
"<span class='gpu-perfstate load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPTHROTTLE']): ?>
"<span class='gpu-throttled load'></span>&nbsp;<span class='gpu-thrtlrsn load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>


<?php if($gpustat_cfg['DISPSESSIONS']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Active Apps)_</span>" +
<?php foreach($apps as $app): ?>
"<span id='gpu-img-span-<?= $app; ?>' class='gpu-img-span gpu-img-span-<?= $app; ?>'>" +
"<img id='gpu-<?= $app; ?>' class='gpu-image' src='/plugins/gpustat/images/<?= $app; ?>.png'>" +
"</span>" +
<?php endforeach; ?>
"</td></tr>" +
<?php endif; ?>
<?php endif; ?>

// Intel GPUs

<?php if ($gpu_intel) : ?>
<?php if($gpustat_cfg['DISP3DRENDER']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(3D Render Load)_" +
"</span><span class='w44'><span class='gpu-3drender load'>0%</span><div class='usage-disk sys'>" +
"<span class='gpu-3drenderbar' id='gpu-3drenderbar'></span><span></span></div></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPBLITTER']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Blitter Load)_" +
"</span><span class='w44'><span class='gpu-blitter load'></span><div class='usage-disk sys'>" +
"<span class='gpu-blitterbar' id='gpu-blitterbar'></span><span></span></div></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPVIDEO']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Video Load)_" +
"</span><span class='w44'><span class='gpu-video load'></span><div class='usage-disk sys'>" +
"<span class='gpu-videobar load' id='gpu-videobar load'></span><span></span></div></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPVIDENH']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Video Enhance Load)_" +
"</span><span class='w44'><span class='gpu-videnh load'></span><div class='usage-disk sys'>" +
"<span class='gpu-videnhbar load' id='gpu-videnhbar load'></span><span></span></div></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPPWRDRAW']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Power Draw)_" +
"</span><span class='w44'><span class='gpu-power load'></span><div class='usage-disk sys'>" +
"<span class='gpu-powerutilbar load' id='gpu-powerutilbar load'></span><span></span></div></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPPCIUTIL']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(IMC Bus Utilization)_" +
"</span><span class='w44'>Receive: <span class='gpu-rxutil'></span> &emsp; Transmit: <span class='gpu-txutil'></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPCLOCKS']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(GPU Clock (MHz))_" +
"</span><span class='w44'><span class='gpu-clock load'></span></td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPINTERRUPT']) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(Interrupts/Sec)_" +
"</span><span class='w44'><span class='gpu-interrupts load'></span></td></tr>" +
<?php endif; ?>
<?php endif; ?>

// AMD GPUs

<?php if ($gpu_amd) : ?>
"<tr><td colspan ='2' ><span class='w36'><i class='ups fa fa-fw icon-hardware'></i>_(GPU Load)_</span>" +
"<span class='w44'><span class='gpu-util load'>0%</span><div class='usage-disk sys'><span class='gpu-utilbar' id='gpu-utilbar'></span><span></span></div></span></td></tr>" +

<?php if($gpustat_cfg['DISPGFXTRANS'] || $gpustat_cfg['DISPMEMUTIL']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-ram'></i>_(Translate - Memory (MB))_</span>" +
<?php if($gpustat_cfg['DISPGFXTRANS']) : ?>
"<span class='gpu-gfxtrans w32 load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPMEMUTIL']) : ?>
"<span class='gpu-memused w32 load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPEVENT'] || $gpustat_cfg['DISPVERTEX']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Event - Vertex (MB))_</span>" +
<?php if($gpustat_cfg['DISPEVENT']) : ?>
"<span class='gpu-event load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPVERTEX']) : ?>
"<span class='gpu-vertex load'></span>"+
<?php endif; ?>
<?php endif; ?>

<?php if($gpustat_cfg['DISPTEXTURE'] || $gpustat_cfg['DISPSEQUENCER']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Texture - Sequencer)_</span>" +
<?php if($gpustat_cfg['DISPTEXTURE']) : ?>
"<span class='gpu-texture load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPSEQUENCER']) : ?>
"<span class='gpu-sequencer load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPSHADEREXP'] || $gpustat_cfg['DISPSHADERINTER']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Shader Export - Interpol)_</span>" +
<?php if($gpustat_cfg['DISPSHADEREXP']) : ?>
"<span class='gpu-shaderexp load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPSHADERINTER']) : ?>
"<span class='gpu-shaderinter load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPSCANCON'] || $gpustat_cfg['DISPPRIMASSEM']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Scan Conv - Prim Assem)_</span>" +
<?php if($gpustat_cfg['DISPSCANCON']) : ?>
"<span class='gpu-scancon load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPPRIMASSEM']) : ?>
"<span class='gpu-primassem load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPDEPTHBLK'] || $gpustat_cfg['DISPCOLORBLK']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Blocks: Depth - Color)_</span>" +
<?php if($gpustat_cfg['DISPDEPTHBLK']) : ?>
"<span class='gpu-depthblk load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPCOLORBLK']) : ?>
"<span class='gpu-colorblk load'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>

<?php if($gpustat_cfg['DISPFAN'] || $gpustat_cfg['DISPPWRDRAW']) : ?>
"<tr><td ><span class='w72'><i class='ups fa fa-fw icon-fan'></i>_(Fan - Power)_</span>" +
<?php if($gpustat_cfg['DISPFAN']) : ?>
"<span class='gpu-fan load'></span>" +
<?php endif; ?>
<?php if($gpustat_cfg['DISPPWRDRAW']) : ?>
"<span class='gpu-power load'><span class='gpu-powerunit'></span>" +
<?php endif; ?>
"</td></tr>" +
<?php endif; ?>


<?php if($gpustat_cfg['DISPCLOCKS']) : ?>
"<tr><td><span class='w72'><i class='ups fa fa-fw icon-hardware'></i>_(Clocks: Shader - Mem (GHz))_</span>" +
"<span class='gpu-clock load'></span>" +
"<span class='gpu-memclock load'></span>" +
"</td></tr>" +
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>

""
);
};

$(function(){
GPUList();
});

</script>
<script type="text/javascript" src="/plugins/gpustat/scripts/gpustat.js"></script>
<script type="text/javascript">
$(gpustat_status);
if (<?=$gpustat_cfg['UIREFRESH'];?>) {
setInterval(gpustat_status, <?=max(abs($display['refresh']), $gpustat_cfg['UIREFRESHINT']);?>);
}
$(gpustat_dash);
</script>
2 changes: 1 addition & 1 deletion src/gpustat/usr/local/emhttp/plugins/gpustat/lib/AMD.php
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ public function getInventory(): array
}
if (!empty($this->inventory)) {
foreach ($this->inventory AS $gpu) {
$result[] = [
$result[$gpu['busid']] = [
'id' => "Bus ID " . $gpu['busid'],
'model' => (string) ($gpu['product'] ?? $gpu['model']),
'guid' => $gpu['busid'],
Loading