| 51 | |
| 52 | |
| 53 | class UserScatteredDataParallel(DictGatherDataParallel): |
| 54 | def scatter(self, inputs, kwargs, device_ids): |
| 55 | assert len(inputs) == 1 |
| 56 | inputs = inputs[0] |
| 57 | inputs = _async_copy_stream(inputs, device_ids) |
| 58 | inputs = [[i] for i in inputs] |
| 59 | assert len(kwargs) == 0 |
| 60 | kwargs = [{} for _ in range(len(inputs))] |
| 61 | |
| 62 | return inputs, kwargs |
| 63 | |
| 64 | |
| 65 | def user_scattered_collate(batch): |
nothing calls this directly
no outgoing calls
no test coverage detected