(shm_name, shape, dtype, ready_q, done_q, error_q)
| 34 | |
| 35 | |
| 36 | def _producer_proc(shm_name, shape, dtype, ready_q, done_q, error_q): |
| 37 | # Create shared memory |
| 38 | try: |
| 39 | paddle.device.set_device("gpu:0") |
| 40 | t = _create_test_tensor(shape, dtype) |
| 41 | set_data_ipc(t, shm_name) |
| 42 | ready_q.put(("ready", t.numpy().tolist())) |
| 43 | _ = done_q.get(timeout=20) |
| 44 | except Exception as e: |
| 45 | error_q.put(("producer_error", str(e))) |
| 46 | |
| 47 | |
| 48 | def _consumer_proc(shm_name, shape, dtype, result_q, error_q): |
nothing calls this directly
no test coverage detected