Fixed findSharedDims for all kernels