creating the sub buffers for kernels