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