(handle_buffer, expected_arr)
| 799 | |
| 800 | |
| 801 | def other_process_for_test_IPC(handle_buffer, expected_arr): |
| 802 | other_context = pa.cuda.Context(0) |
| 803 | ipc_handle = pa.cuda.IpcMemHandle.from_buffer(handle_buffer) |
| 804 | ipc_buf = other_context.open_ipc_buffer(ipc_handle) |
| 805 | ipc_buf.context.synchronize() |
| 806 | buf = ipc_buf.copy_to_host() |
| 807 | assert buf.size == expected_arr.size, repr((buf.size, expected_arr.size)) |
| 808 | arr = np.frombuffer(buf, dtype=expected_arr.dtype) |
| 809 | np.testing.assert_equal(arr, expected_arr) |
| 810 | |
| 811 | |
| 812 | @cuda_ipc |
nothing calls this directly
no test coverage detected