kicad2ems.emsdev

emsdev - the machine as the kicad2ems solvers see it: GPUs, CPU cores, memory,
and the compiled cores' build.

mom25d and gfdtd each run standalone and under kicad2ems; this package is what
they share, so a device or a backend is found, measured and picked one way, and
kicad2ems reports what they will use without importing either:

    from kicad2ems.emsdev import gpu, cpu, memory
    gpu.devices()  # [Device(index, name, library, api, total)]: the GPUs
                   # Vulkan sees
    vulkan.slang_device()  # the slangpy device the solvers' Vulkan backends run
                           # on
    gpu.preference('auto', 'MOM25D_GPU')  # a backend setting, the environment's
                                          # override applied
    cpu.core_threads()  # the CPU cores' default thread count: one per fast
                        # physical core
    memory.available()  # bytes this process may use now (cgroup aware)

    python -m kicad2ems.emsdev                 # all of it, one line each

    from kicad2ems.emsdev.afs import adaptive_sweep
        # the S-parameter sweep mom25d and pcbqs share (numpy)

No dependencies (emsdev.afs's numpy aside): slangpy is imported only
when asked about, and its absence is an answer; Vulkan's GPUs are found
through the system's Vulkan loader (ctypes).

Modules