Skip to content
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

Ensure we pick the right gpu card in the example backend #6557

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

arjo129
Copy link

@arjo129 arjo129 commented Nov 16, 2024

Connections
fixes #6522

Description
This is my first time contributing to this project, so it may be that I'm doing something wrong. Essentially, we retain the old behavior if we use the environment variable to select our gpu. Otherwise we first try to match required features prior to selecting an adapter.

Testing

Just run the example as done before.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@arjo129 arjo129 requested a review from a team as a code owner November 16, 2024 01:40
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

thanks for your contribution! looks good to me!

@Wumpf
Copy link
Member

Wumpf commented Nov 16, 2024

ah but I think this will fail wasm ci because enumerate_adapters is native only, let's see

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

yeah, this still needs special handling for wasm (and fix unused warnings) - that checklist on the PR template is there for a reason ;-)

@arjo129
Copy link
Author

arjo129 commented Nov 17, 2024

Thanks @Wumpf for pointing that out. Sorry about that. I've fixed wasm support by refactoring this logic out into a seperate function.

@arjo129 arjo129 requested a review from Wumpf November 17, 2024 06:57
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

no worries!
a little bit much c&p for my taste, but this will do just fine :)

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.

Pick supported adapter for examples
2 participants