mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-01 15:58:36 +02:00
[core] Stats: Retrieve and set the GPU name if it is found
The GPU's name was never retrieved, meaning that whenever a GPU was found, all its information was displayed, except for its name, although it was expected on the QML side. This commit fixes this issue.
This commit is contained in:
parent
dda2493df9
commit
c8237bbb0f
1 changed files with 6 additions and 0 deletions
|
@ -96,6 +96,11 @@ class ComputerStatistics:
|
|||
smiTree = ET.fromstring(xmlGpu)
|
||||
gpuTree = smiTree.find('gpu')
|
||||
|
||||
try:
|
||||
self.gpuName = gpuTree.find('product_name').text
|
||||
except Exception as e:
|
||||
logging.debug('Failed to get gpuName: "{}".'.format(str(e)))
|
||||
pass
|
||||
try:
|
||||
gpuMemoryUsed = gpuTree.find('fb_memory_usage').find('used').text.split(" ")[0]
|
||||
self._addKV('gpuMemoryUsed', gpuMemoryUsed)
|
||||
|
@ -105,6 +110,7 @@ class ComputerStatistics:
|
|||
try:
|
||||
self.gpuMemoryTotal = gpuTree.find('fb_memory_usage').find('total').text.split(" ")[0]
|
||||
except Exception as e:
|
||||
logging.debug('Failed to get gpuMemoryTotal: "{}".'.format(str(e)))
|
||||
pass
|
||||
try:
|
||||
gpuUsed = gpuTree.find('utilization').find('gpu_util').text.split(" ")[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue