MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _producer_proc

Function _producer_proc

tests/operators/test_share_external_data.py:36–45  ·  view source on GitHub ↗
(shm_name, shape, dtype, ready_q, done_q, error_q)

Source from the content-addressed store, hash-verified

34
35
36def _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
48def _consumer_proc(shm_name, shape, dtype, result_q, error_q):

Callers

nothing calls this directly

Calls 4

_create_test_tensorFunction · 0.85
numpyMethod · 0.80
putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected