Closed kushalkolar closed 1 month ago
Do you think it makes sense to expose this as a top level import? I don't think there's a use case for many more gpu related functions to create a "fpl.gpu" namespace.
Do you think it makes sense to expose this as a top level import? I don't think there's a use case for many more gpu related functions to create a "fpl.gpu" namespace.
In pygfx
we deliberately do not make it part of the toplevel namespace, because its not something most users need. Maybe more important, it makes code less portable. But in pygfx we already had a namespace for advanced wgou-specific stuff (gfx.renderers.wgpu
). Perhaps introducing a namespace just for this (in fpl) is a bit overkill ...
Maybe put differently ... if fpl is currently a single namespace, I'd just put it in there, I think.
Thanks! I like having your input since you're much much experienced in API design 😄
basically wrapper for https://github.com/pygfx/pygfx/pull/709 and https://github.com/pygfx/wgpu-py/pull/481
Adds a
fastplotlib.utils.gpu
module, and exposesenumerate_adapters
,select_adapter
, andprint_wgpu_report
at top level.Example:
Also added corresponding info to docs: https://fastplotlib--491.org.readthedocs.build/en/491/user_guide/gpu.html#gpu-info