append key/values in batch to dict. automatically decide cuda grid.