Skip to content

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 !

ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
* Added powerPreference argument to detectGPUDevice() while keeping old behaviour as default.
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