summaryrefslogtreecommitdiffstats
path: root/python/astra/astra.py
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2017-10-17 17:20:40 +0200
committerWillem Jan Palenstijn <wjp@usecode.org>2017-10-17 17:20:40 +0200
commit17ebcfefa7c42cff61a81bf12a915983b330ed15 (patch)
treed0bf19b4e049e97d5de6c666f31fd8bf621105d3 /python/astra/astra.py
parentb3a80d71aa9a80223729b8cb47a55297f985faaf (diff)
downloadastra-17ebcfefa7c42cff61a81bf12a915983b330ed15.tar.gz
astra-17ebcfefa7c42cff61a81bf12a915983b330ed15.tar.bz2
astra-17ebcfefa7c42cff61a81bf12a915983b330ed15.tar.xz
astra-17ebcfefa7c42cff61a81bf12a915983b330ed15.zip
Add astra.astra.get_gpu_info utility function
Diffstat (limited to 'python/astra/astra.py')
-rw-r--r--python/astra/astra.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/astra/astra.py b/python/astra/astra.py
index 3804d51..434ccb9 100644
--- a/python/astra/astra.py
+++ b/python/astra/astra.py
@@ -45,6 +45,16 @@ def set_gpu_index(idx, memory=0):
"""
a.set_gpu_index(idx, memory)
+def get_gpu_info(idx=-1):
+ """Get GPU info.
+
+ :param idx: GPU index, or -1 for current device
+ :type idx: :class:`int`
+ :returns: :class:`str` -- GPU info
+ """
+ return a.get_gpu_info(idx)
+
+
def delete(ids):
"""Delete an astra object.