(destination_tensor, source_tensor)
| 72 | |
| 73 | |
| 74 | def copy_tensor_model_parallel_attributes(destination_tensor, source_tensor): |
| 75 | def maybe_copy(attribute): |
| 76 | if hasattr(source_tensor, attribute): |
| 77 | setattr(destination_tensor, attribute, getattr(source_tensor, attribute)) |
| 78 | |
| 79 | for attribute in _MODEL_PARALLEL_ATTRIBUTE_DEFAULTS: |
| 80 | maybe_copy(attribute) |
| 81 | |
| 82 | |
| 83 | def _initialize_affine_weight_gpu(weight, init_method, partition_dim, stride=1): |
nothing calls this directly
no test coverage detected