← 输入框|github.com|刷新
Skip to content

maxComputeWorkgroupStorageSize limit #2832

Open

Description

@jereroy

Currently, the limit of maxComputeWorkgroupStorageSize is 16352 which seems a bit odd. Would it be possible to make it 16384?

Activity

  1. added this to the V1.0 milestone on May 6, 2022
  2. kainino0x commented on May 6, 2022

    @kainino0x
    Contributor

    Thanks for filing! This limitation originally came from Metal (Apple1 and Apple2 families) and Vulkan in #1863. However according to #1069 we do not support Apple1/Apple2 anymore anyway. So I checked using the gpuinfo-vulkan-query tool to see if we really need 16352 on Vulkan, and it appears we do not.

        add_min_limit('maxComputeSharedMemorySize', 16384)
        add_min_limit('maxComputeSharedMemorySize', 32768)
    Requirement "maxComputeSharedMemorySize >= 16384" loses no further reports!
    Requirement "maxComputeSharedMemorySize >= 32768" loses 1 (and partially loses 1) further deviceNames:
      In ALL reports (1 deviceNames):
        x Adreno (TM) 610: 53 (7037 8669 9434 9524 10094 10192 10384 10410 10412 10420 10471 10516 10572 10885 10932 11059 11076 11212 11372 11375 11384 11390 11459 11522 11701 11917 11936 11946 11974 12002 12158 12294 12350 12367 12420 12546 12897 12899 12999 13031 13080 13146 13219 13257 13262 13288 13565 13651 13763 13903 13916 14022 14043)
      In SOME reports (1 deviceNames):
        ~ Adreno (TM) 612: 11 of 13 (7178 7986 9014 10707 10874 11318 11661 12084 12126 12216 12476; ok: 5789 6220)
    

    Unfortunately it doesn't look like we can bump to 32k right now - this would drop Metal family Apple3 (A9/A10) and Adreno 610/612 (though interestingly it doesn't drop any Adreno 500 devices). But it's a definite possibility for the future.

    D3D SM5.0 guarantees 32kB (#1069 says we require SM5.1): https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#18.6.6%20Inter-Thread%20Data%20Sharing

  3. kainino0x commented on May 6, 2022

    @kainino0x
    Contributor

    Oh, I was going to look closer at Vulkan. Actually, it doesn't look like any Vulkan devices go below 16384:
    http://vulkan.gpuinfo.org/displaydevicelimit.php?name=maxComputeSharedMemorySize&platform=all
    So the restriction was from Metal only.

  4. kainino0x commented on May 6, 2022

    @kainino0x
    Contributor

    Currently, the limit of maxComputeWorkgroupStorageSize is 16352

    BTW, this is only the required minimum value. Implementations can already expose 16384 or higher values.

  5. kainino0x commented on May 6, 2022

    @kainino0x
    Contributor

    (Actually I'm going to open a PR for 16384 in V1 and recategorize this issue as post-V1 for 32768.)

  6. modified the milestones: V1.0, post-V1 on May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU API

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions