(state_dict)
| 681 | return new_state |
| 682 | |
| 683 | def copy_optim_state_dict_cpu_fp16(state_dict): |
| 684 | new_state = {} |
| 685 | new_state['optimizer_state_dict'] = copy_optim_state_dict_cpu(state_dict['optimizer_state_dict']) |
| 686 | for k in state_dict.keys(): |
| 687 | if k != 'optimizer_state_dict': |
| 688 | new_state[k] = copy.deepcopy(state_dict[k]) |
| 689 | return new_state |
| 690 | |
| 691 | def sync_print(*args, **kwargs): |
| 692 | rank = dist.get_rank() |
nothing calls this directly
no test coverage detected