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

[Web]Allows setting powerPreference on webgpu #17545

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

marschr
Copy link
Contributor

@marschr marschr commented Nov 27, 2024

This PR adds the powerPreferece argument to detetectGPUDevice(), while keeping the previous functionality as default, without breaking older code.

In hybrid GPU systems (mainly laptops) is sometimes needed to select the low-power integrated GPU in order to test model inference on https://github.com/mlc-ai/web-llm/ for other low-power devices or just to save on battery.

Here's the related line of code on the web-llm repository that references this function:
https://github.com/mlc-ai/web-llm/blob/082f04e4941ff4f6ef70731d244c69228948c7a1/src/service_worker.ts#L117

@marschr marschr changed the title [Web]Allows setting powerPreference on webgpu. [Web]Allows setting powerPreference on webgpu Nov 29, 2024
@marschr marschr closed this Nov 29, 2024
@marschr marschr reopened this Nov 29, 2024
@tqchen tqchen merged commit 4454f8d into apache:main Dec 10, 2024
16 checks passed
@tqchen
Copy link
Member

tqchen commented Dec 10, 2024

Thanks @marschr !

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