(dst, src, blocking=True)
| 406 | |
| 407 | |
| 408 | def h2d_copy(dst, src, blocking=True): |
| 409 | if not current_platform.is_cuda() or not is_paddle_support_new_h2d(): |
| 410 | # For non-GPU devices, data is transferred to device (H2D) in advance. |
| 411 | src = get_tensor(src) |
| 412 | if len(src.shape) == 1: |
| 413 | # TODO (bukejiyu):A recently merged Paddle PR introduced a hang when copying 1-D non-contiguous tensors. This approach serves as a temporary workaround. |
| 414 | src = get_tensor(src) |
| 415 | dst.copy_(src, blocking) |
| 416 | |
| 417 | |
| 418 | def v1_loader_support(fd_config): |
no test coverage detected