kicad2ems.emsdev.gpu

The GPUs: which ones Vulkan (emsdev.vulkan) sees, what each is (name, memory),
and how a solver's backend setting reads
(preference). A solver keeps its own backends (mom25d's LU, gfdtd's update
kernels) and asks here which device they would run on.

    gpu.vulkan_device()  the best Vulkan GPU (emsdev.vulkan; slangpy runs the
                         solvers' kernels on it)
    gpu.devices()        every device of every library that has one: [Device]
    gpu.probe()          (devices, why): why lists what failed, one reason per
                         library
class kicad2ems.emsdev.gpu.Device(index: int, name: str, library: str, api: str, total: float = None, version: str = '', _free: object = None)[source]
as_dict()[source]
The JSON form kicad2ems's sysinfo reports (GB).
free()[source]
Bytes free on the device now (the library's cached blocks released
first), None if it cannot tell.
exception kicad2ems.emsdev.gpu.Unavailable[source]
A library has no usable GPU; the message says why.
kicad2ems.emsdev.gpu.preference(pref='auto', env=None, aliases=None)[source]
A backend setting as a solver reads it: 'off', 'auto' or a backend's name
(lower case). The environment variable `env`, when set, overrides pref;
aliases maps other names onto backends (gfdtd: vk -> vulkan).
kicad2ems.emsdev.gpu.probe(libraries=('vulkan',))[source]
(devices, why): every device of each library, and what kept a library
from giving any.
kicad2ems.emsdev.gpu.vulkan_device(index=None, need=())[source]
Device of Vulkan adapter `index` (None: the best, or
EMSDEV_VULKAN_DEVICE's): emsdev.vulkan.device; `need`: the features a
solver's kernels use (Unavailable where the GPU lacks one).