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

[WebGPU] Fall back to 256MB for maxBufferSize if needed #17150

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

CharlieFRuan
Copy link
Contributor

By default, we request 1GB of maxStorageBufferBindingSize and maxBufferSize when detecting a WebGPU device. However, low-resource devices such as iOS and Android may not be able to support 1GB.

A previous PR falls back maxStorageBufferBindingSize to 128MB, the default values stated in WGSL doc, motivated by Android Chrome. This PR falls back maxBufferSize to 256MB, the default value, motivated by iOS Safari.

@CharlieFRuan
Copy link
Contributor Author

Tested end-to-end on WebLLM with iPhone iOS 18 Beta Safari.
image

@MasterJH5574 MasterJH5574 merged commit 32e9a48 into apache:main Jul 11, 2024
16 checks passed
CharlieFRuan added a commit to mlc-ai/web-llm that referenced this pull request Jul 11, 2024
Exactly the same as 0.2.46 except we update TVMjs to
apache/tvm@32e9a48.

The main change is that, when requesting a WebGPU device, we may fall
back `maxBufferSize` to the default 256MB when 1GB is too much for the
device. This is motivated by iOS support on Safari, tested on iOS 18
Developer Beta. Fore more, see:
- apache/tvm#17150

### Model WASM Version
No change, still v0.2.43.

### TVMjs
Updated, compiled at
apache/tvm@32e9a48
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.

3 participants