← 返回首页
Select gpu by kushalkolar · Pull Request #491 · fastplotlib/fastplotlib · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Select gpu#491

Merged
kushalkolar merged 6 commits into
mainfrom
select-gpu
Apr 16, 2024
Merged

Select gpu#491
kushalkolar merged 6 commits into
mainfrom
select-gpu

Conversation

kushalkolar commented Apr 16, 2024
edited
Loading

Copy link
Copy Markdown
Member

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

almarklein left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Nice! Just 2 small comments.

Comment thread docs/source/user_guide/gpu.rst Outdated Show resolved Hide resolved
Comment thread docs/source/user_guide/gpu.rst Outdated Show resolved Hide resolved

Copy link
Copy Markdown
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 commented Apr 16, 2024
edited
Loading

Copy link
Copy Markdown
Collaborator

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 commented Apr 16, 2024
edited
Loading

Copy link
Copy Markdown
Member Author

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

kushalkolar marked this pull request as ready for review April 16, 2024 21:40
kushalkolar merged commit 1abe5ed into main Apr 16, 2024
kushalkolar deleted the select-gpu branch April 16, 2024 23:31
kushalkolar mentioned this pull request Apr 16, 2024
kushalkolar mentioned this pull request Jun 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.