File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3736,6 +3736,12 @@ static vk_device ggml_vk_get_device(size_t idx) {
37363736
37373737 device->subgroup_arithmetic = (vk11_props.subgroupSupportedStages & vk::ShaderStageFlagBits::eCompute) &&
37383738 (vk11_props.subgroupSupportedOperations & vk::SubgroupFeatureFlagBits::eArithmetic);
3739+ #ifdef __APPLE__
3740+ // Workaround for subgroup arithmetic failing on MoltenVK with AMD GPUs (issue 15846)
3741+ if (device->vendor_id == VK_VENDOR_ID_AMD) {
3742+ device->subgroup_arithmetic = false;
3743+ }
3744+ #endif
37393745 device->subgroup_shuffle = (vk11_props.subgroupSupportedStages & vk::ShaderStageFlagBits::eCompute) &&
37403746 (vk11_props.subgroupSupportedOperations & vk::SubgroupFeatureFlagBits::eShuffle);
37413747 device->subgroup_clustered = (vk11_props.subgroupSupportedStages & vk::ShaderStageFlagBits::eCompute) &&
You can’t perform that action at this time.
0 commit comments