XApp.GpuOffloadHelper¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted by the helper when it has completed gathering GPU information. |
Fields¶
- Inherited:
Class Details¶
- class XApp.GpuOffloadHelper(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get()¶
- Returns:
a new
XApp.GpuOffloadHelper
.- Return type:
Creates a new
XApp.GpuOffloadHelper
instance.The
XApp.GpuOffloadHelper
::ready
signal will be emitted when the helper is initialized (successfully or not).New in version 2.6.
- classmethod get_sync()¶
- Returns:
a new
XApp.GpuOffloadHelper
, fully initialized.- Return type:
Creates a new
XApp.GpuOffloadHelper
instance. This performs initialization synchronously, and can potentially block.Use
XApp.GpuOffloadHelper.is_ready
() to see if the helper was initialized successfully.New in version 2.6.
- get_default_info()¶
- Returns:
the default
XApp.GpuInfo
. Do not free- Return type:
Returns an
XApp.GpuInfo
for the default GPU.New in version 2.6.
- get_info_by_id(id)¶
- Parameters:
id (
int
) – The ID of the info to retrieve.- Returns:
the appropriate
XApp.GpuInfo
, orNone
if id was invalid.- Return type:
Returns an
XApp.GpuInfo
with the given ID.New in version 2.6.
- get_n_gpus()¶
- Returns:
the total number of GPUs. A return value larger than 1 implies there are offloadable GPUs available.
- Return type:
Gets the number of GPUs noticed by Switcheroo.
New in version 2.6.
- get_offload_infos()¶
- Returns:
a list of
XApp.GpuInfos
orNone
if there is only a single GPU. The elements are owned by self but the container itself should be freed.- Return type:
Generates a list of
XApp.GpuInfos
that can be offloaded to, if there are any.New in version 2.6.
- is_offload_supported()¶
-
Checks if there is a non-default GPU available for offloading.
New in version 2.6.
Signal Details¶
- XApp.GpuOffloadHelper.signals.ready(gpu_offload_helper, success)¶
- Signal Name:
ready
- Flags:
- Parameters:
gpu_offload_helper (
XApp.GpuOffloadHelper
) – The object which received the signalsuccess (
bool
) – Whether or not the helper initialize successfully.
This signal is emitted by the helper when it has completed gathering GPU information. It will only be sent once.