Skip to content

Conversation

@CharlieFRuan
Copy link
Member

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
Member 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
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
jingyi-zhao-01 pushed a commit to jingyi-zhao-01/web-llm that referenced this pull request Dec 8, 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
atebites-hub pushed a commit to atebites-hub/web-llm that referenced this pull request Oct 4, 2025
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