(p)
| 152 | |
| 153 | |
| 154 | def is_model_parallel_parameter(p) -> bool: |
| 155 | if hasattr(p, 'model_parallel') and p.model_parallel: |
| 156 | return True |
| 157 | |
| 158 | if hasattr(p, 'tensor_model_parallel') and p.tensor_model_parallel: |
| 159 | return True |
| 160 | |
| 161 | return False |
| 162 | |
| 163 | |
| 164 | def copy_to_device(item, device, criterion_func): |
no outgoing calls