(self, inputs, kwargs, device_ids)
| 157 | |
| 158 | """ |
| 159 | def scatter(self, inputs, kwargs, device_ids): |
| 160 | # More like scatter and data prep at the same time. The point is we prep the data in such a way |
| 161 | # that no scatter is necessary, and there's no need to shuffle stuff around different GPUs. |
| 162 | devices = ['cuda:' + str(x) for x in device_ids] |
| 163 | splits = self.prepare_data(inputs[0], devices, allocation=args.batch_alloc) |
| 164 | |
| 165 | return [[split[device_idx] for split in splits] for device_idx in range(len(devices))], \ |
| 166 | [kwargs] * len(devices) |
| 167 | |
| 168 | def gather(self, outputs, output_device): |
| 169 | out = {} |
nothing calls this directly
no test coverage detected