Unlike CUDA/OpenCL, in HLSL (the shader language of DX), the shape of thread group has to be specified statically using numthreads [x, y, z] annotation to the entry function.
C++ AMP also has this static-compilation requirement.