Content-Length: 338801 | pFad | https://github.com/fastplotlib/fastplotlib/pull/491

A5 Select gpu by kushalkolar · Pull Request #491 · fastplotlib/fastplotlib · GitHub
Skip to content

Select gpu #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2024
Merged

Select gpu #491

merged 6 commits into from
Apr 16, 2024

Conversation

kushalkolar
Copy link
Member

@kushalkolar kushalkolar commented Apr 16, 2024

basically wrapper for pygfx/pygfx#709 and pygfx/wgpu-py#481

Adds a fastplotlib.utils.gpu module, and exposes enumerate_adapters, select_adapter, and print_wgpu_report at top level.

Example:

import fastplotlib as fpl

fpl.select_adapter(fpl.enumerate_adapters()[2])

Also added corresponding info to docs: https://fastplotlib--491.org.readthedocs.build/en/491/user_guide/gpu.html#gpu-info

Copy link
Collaborator

@almarklein almarklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just 2 small comments.

@kushalkolar
Copy link
Member Author

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.

@almarklein
Copy link
Collaborator

almarklein commented Apr 16, 2024

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.

@kushalkolar
Copy link
Member Author

kushalkolar commented Apr 16, 2024

Thanks! I like having your input since you're much much experienced in API design 😄

@kushalkolar kushalkolar marked this pull request as ready for review April 16, 2024 21:40
@kushalkolar kushalkolar merged commit 1abe5ed into main Apr 16, 2024
@kushalkolar kushalkolar deleted the select-gpu branch April 16, 2024 23:31
@kushalkolar kushalkolar mentioned this pull request Apr 16, 2024
@kushalkolar kushalkolar mentioned this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/fastplotlib/fastplotlib/pull/491

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy