Fix a bug in dummy data provider
Use buffered memory in outputs of layers when multigpu