Skip to content

subgroups on mac are broken #909

@ArthurBrussee

Description

@ArthurBrussee

Subgroups (or SIMD in metal speak) were accidentally disabled for a while on the MSL backend. Recent changes to the feature registration meaning it now does work! However, I ran into

2025-09-22T20:51:16Z ERROR wgpu_core::device::resource] Shader error: MSL: "program_source:123:22: error: no matching function for call to 'simd_sum'\nconst float_4 l_61 = simd_sum(l_60);\n                     ^~~~~~~~\n/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.830/include/metal/metal_simdgroup:274:14: note: candidate template ignored: requirement '__is_valid_simdgroup_type<float_4, void>::value' was not satisfied [with T = float_4]\nMETAL_FUNC T simd_sum(T data)\n             ^\nprogram_source:133:12: warning: unused variable 'l_66' [-Wunused-variable]\nconst uint l_66 = l_arr_0[l_65];\n           ^\n"
[2025-09-22T20:51:16Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default

thread 'tokio-runtime-worker' panicked at /Users/arthurbrussee/.cargo/git/checkouts/wgpu-50febe783b343bfe/bdf430c/wgpu/src/backend/wgpu_core.rs:1055:30:
wgpu error: Validation Error

Caused by:
  In Device::create_shader_module_passthrough, label = 'reduce_kernel'
    Failed to generate the backend-specific code


note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

it seems that some functions try to operate on the generated float_4 type rather than a native float4 for which the SIMD functions are defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions