GPU#

class vulkpy.GPU#

Bases: object

GPU instance

Examples

>>> import vulkpy as vk
>>> gpu = vk.GPU()

If you have multiple GPUs, you can specify GPU index

>>> gpu1 = vk.GPU(1)

GPU equality is checked by GPU index

>>> gpu == gpu1
False
>>> gpu == vk.GPU()
True

Methods Summary

flush(arrays)

Flush buffers

wait()

Wait All GPU Operations

Methods Documentation

flush(arrays: Iterable[Array])#

Flush buffers

Parameters:

arrays (iterable of Array) – Arrays to be flushed

wait()#

Wait All GPU Operations

__init__(idx: int = 0, priority: float = 0.0)#

Initialize GPU

Parameters:
  • idx (int, optional) – Index to specify one GPU from multiple GPUs. Default is 0.

  • priority (float, optional) – GPU priority. Default is 0.0.