Closed Bug 1970416 Opened 7 months ago Closed 7 months ago

maxComputeWorkgroupStorageSize exceeded limit error on flower intelligence demo

Categories

(Core :: Graphics: WebGPU, defect, P3)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox141 --- affected

People

(Reporter: jimm, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

"Failed to get a valid response: WebLLM engine failed with: Error: Cannot initialize runtime because of requested maxComputeWorkgroupStorageSize exceeds limit. requested=32768, limit=16384."

https://chat.flower.ai/

Attached file about support
Blocks: webgpu-apps
Severity: -- → S3
Priority: -- → P3
See Also: → 1970479
See Also: → 1863119

Teo chased down some background here. We have the following lovely code in the wgpu_hal::dx12 backend:

                    max_compute_workgroup_storage_size: base.max_compute_workgroup_storage_size, //TODO?

According to the WebGPU correspondence doc:

    <tr>
        <th>`maxComputeWorkgroupStorageSize`
        <td>[#1863](https://github.com/gpuweb/gpuweb/issues/1863)
        <td>`maxComputeSharedMemorySize`
        <td>`Maximum total threadgroup memory allocation`
        <td>[32 KiB](https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#18.6.6%20Inter-Thread%20Data%20Sharing)

According to the D3D11 functional spec text linked above, this is just a fixed constant, not specific to the device:

The hardware functionality required to address this in the DirectX11 shader model 5.0 compute shader is a predefined block of 32kB (8192 DWORDs) of register space that can be declared within a shader to be of storage class “groupShared”. Registers declared to be of this class can be shared between threads in the group.

I believe this means fixing wgpu_hal should be as simple as just hard-coding 32k.

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: