Add split/rejoin on space logic to lib for batch normalization.