Copy the information of parameters from other program. Notes: This is a very low level API. Users should not invoke it directly. Args: other(Program): Other program Returns: None
(self, other)
| 7341 | block._sync_with_cpp() |
| 7342 | |
| 7343 | def _copy_param_info_from(self, other): |
| 7344 | """ |
| 7345 | Copy the information of parameters from other program. |
| 7346 | |
| 7347 | Notes: This is a very low level API. Users should not invoke it |
| 7348 | directly. |
| 7349 | |
| 7350 | Args: |
| 7351 | other(Program): Other program |
| 7352 | |
| 7353 | Returns: |
| 7354 | None |
| 7355 | """ |
| 7356 | if not isinstance(other, Program): |
| 7357 | raise TypeError( |
| 7358 | f"Function Program._copy_param_info_from() needs to pass in a source Program, but received {type(other)}" |
| 7359 | ) |
| 7360 | |
| 7361 | self.global_block()._copy_param_info_from(other.global_block()) |
| 7362 | |
| 7363 | def _copy_dist_param_info_from(self, other): |
| 7364 | """ |
no test coverage detected