web-llm
web-llm copied to clipboard
[BUG] Find an error initializing the WebGPU device OperationError: D3D12
While running on the candy chrome I got those errors: (firstly the Init error
and on the second request the rest)
[System Initalize] Initialize GPU device: WebGPU - intel
[System Initalize] Fetching param cache[71/163]: 1765MB fetched. 43% completed, 656 secs elapsed. It can take a while when we first visit this page to populate the cache. Later refreshes will become faster.
Init error, OperationError: The operation failed for an operation-specific reason
Find an error initializing the WebGPU device OperationError: D3D12 create command queue failed with DXGI_ERROR_DEVICE_REMOVED (0x887A0005) at CheckHRESULTImpl (..\..\third_party\dawn\src\dawn\native\d3d\D3DError.cpp:94) at Initialize (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:84) at Create (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:69)
Init error, Error: Find an error initializing WebGPU: OperationError: D3D12 create command queue failed with DXGI_ERROR_DEVICE_REMOVED (0x887A0005) at CheckHRESULTImpl (..\..\third_party\dawn\src\dawn\native\d3d\D3DError.cpp:94) at Initialize (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:84) at Create (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:69)
console:
ID3D12Device::CreateCommittedResource failed with DXGI_ERROR_DEVICE_REMOVED (0x887A0005)
at CheckHRESULTImpl (..\..\third_party\dawn\src\dawn\native\d3d\D3DError.cpp:94)
at CreateCommittedResource (..\..\third_party\dawn\src\dawn\native\d3d12\ResourceAllocatorManagerD3D12.cpp:565)
at AllocateMemory (..\..\third_party\dawn\src\dawn\native\d3d12\ResourceAllocatorManagerD3D12.cpp:391)
at Initialize (..\..\third_party\dawn\src\dawn\native\d3d12\BufferD3D12.cpp:158)
at Create (..\..\third_party\dawn\src\dawn\native\d3d12\BufferD3D12.cpp:105)
at CreateBuffer (..\..\third_party\dawn\src\dawn\native\Device.cpp:1508)
llm_chat.js:547 undefined
llm_chat.js:421 undefined
llm_chat.js:547 Error: Find an error initializing WebGPU: OperationError: D3D12 create command queue failed with DXGI_ERROR_DEVICE_REMOVED (0x887A0005)
at CheckHRESULTImpl (..\..\third_party\dawn\src\dawn\native\d3d\D3DError.cpp:94)
at Initialize (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:84)
at Create (..\..\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:69)
at #asyncInitTVM (https://mlc.ai/web-llm/dist/llm_chat.js:423:13)
at async LLMChatInstance.asyncInit (https://mlc.ai/web-llm/dist/llm_chat.js:443:5)
at async LLMChatInstance.generate (https://mlc.ai/web-llm/dist/llm_chat.js:544:7)
at async tvmjsGlobalEnv.asyncOnGenerate (https://mlc.ai/web-llm/dist/llm_chat.js:606:3)
OS: Windows 10
It always seems to be stopped at 71/72
what is your GPU RAM limit, since we are definitely pressure testing GPU a bit and if you do not have more than 6.5G of RAM, it might cause problems
It seems likely that the intel graphics card will fail after about 1765MB when the cap in 2160MB, including the fact that it renders the monitors
Although the candy chrome is using both it seems
chrome://gpu
:
<Integrated GPU> D3D12 backend - Intel(R) HD Graphics 4600
[WebGPU Status]
Available
...
<Discrete GPU> D3D12 backend - NVIDIA GeForce GT 750M
[WebGPU Status]
Available
facing this error while running on windows 10 x64 chrome Version 112.0.5615.121: Error: Find an error initializing WebGPU: OperationError: Required limit (1073741824) is greater than the supported limit (268435456).
-
While validating maxBufferSize
-
While validating required limits
at #asyncInitTVM (llm_chat.js:423:13) at async LLMChatInstance.asyncInit (llm_chat.js:443:5) at async LLMChatInstance.generate (llm_chat.js:544:7) at async tvmjsGlobalEnv.asyncOnGenerate (llm_chat.js:606:3)
@aseok this is related to #21 , you can try to upgrade your browser to chrome 113(beta)
@0dminnimda Unfortunately year the card's memory is not enough for this model, since we need ~ 6G , we will work on bringing more optimizations and smaller models
Here's a quick fix if you're on macOS
:
- download Canary.
- install it into
/Applications
. - go to
zsh
, or whatever terminal yo prefer and run:"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary" --enable-dawn-features=disable_robustness
, nb: the quotes around theFilename Spaces
. - in the URL bar go to https://mlc.ai/web-llm/#chat-demo`
- it should take ~5 min to download the LLM into your browser cache.
- If you want something That Just Works™️, then try saving this script (
vicuna.sh
):
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --enable-dawn-features=disable_robustness --new-window "https://mlc.ai/web-llm/#chat-demo"
# don't forget to bless this file from the PWD: `chmod +x vicuna.sh`
- Before you double click on it from your Desktop/Applications etc. Bless it using:
chmod +x vicuna.sh
.