SIMD-group shuffle on iOS?

It seems like the SIMD-group shuffle instructions (e.g.

simd_shuffle(), simd_shuffle_down(), simd_shuffle_xor()
etc. – subsection 5.13) aren't supported on iOS (
#include <metal_simdgroup>
throws an error).


I'd like to know why aren't these instructions available on iOS – is it because the GPU architectures don't allow for these instructions to be implemented (why?), or is there any other reason?


Furthermore is there a plan to add these instructions to iOS?

Accepted Reply

You're correct in your assertion that iOS GPUs don't support these instructions. That's generally why one feature is sometimes avaliable on macOS but not iOS.

If it is supported in a future iOS GPU, it would only work with devices that have that GPU (not necessarily all devices supported by a given iOS version)

Replies

You're correct in your assertion that iOS GPUs don't support these instructions. That's generally why one feature is sometimes avaliable on macOS but not iOS.

If it is supported in a future iOS GPU, it would only work with devices that have that GPU (not necessarily all devices supported by a given iOS version)

Thank you.


I have one more question though; given the iPhone 8's GPU supports the shuffle instructions (highly unlikely, I know), would the current iOS version (iOS 11) add support for the shuffle instrucitons (possibly in the form of iOS update and just for the given GPU, of course), or would we need to wait for the next iOS release (iOS 12) for the support to be added?

Dan, is your answer still valid now that the A11 GPU supports Threadgroup Sharing?


The documentation page mentions the ability to "share data between threads".

Does this mean availability of simdgroup operations (shuffle instructions) on A11 GPU?


Edit:

Based on Metal Shading Language Specification, the iOS platform supports quadgroups instead of simdgroups.

Correct. A11 doesn't support full simd groups, but it does support quad groups.


This Forward Plus with Tile Shading sample uses this in its cull_lights kernel.