MCPcopy Index your code
hub / github.com/PaddlePaddle/FastDeploy / create

Method create

fastdeploy/inter_communicator/fmq.py:131–137  ·  view source on GitHub ↗
(data_bytes: bytes)

Source from the content-addressed store, hash-verified

129
130 @staticmethod
131 def create(data_bytes: bytes) -> "Descriptor":
132 # Create shared memory buffer and store payload
133 name = f"fmq_shm_{uuid.uuid4().hex}"
134 shm = shared_memory.SharedMemory(create=True, size=len(data_bytes), name=name)
135 shm.buf[: len(data_bytes)] = data_bytes
136 shm.close()
137 return Descriptor(shm_name=name, size=len(data_bytes))
138
139 def read_and_unlink(self) -> bytes:
140 # Read and cleanup shared memory

Callers 15

chatFunction · 0.45
cmdMethod · 0.45
cmdMethod · 0.45
test_openai.pyFile · 0.45
putMethod · 0.45
openai_vl_demo.pyFile · 0.45
openai_demo.pyFile · 0.45
query_modelFunction · 0.45
test_pd_separationFunction · 0.45
test_pd_separationFunction · 0.45
test_pd_separationFunction · 0.45
test_v1_modeFunction · 0.45

Calls 2

DescriptorClass · 0.85
closeMethod · 0.45

Tested by 15

test_pd_separationFunction · 0.36
test_pd_separationFunction · 0.36
test_pd_separationFunction · 0.36
test_v1_modeFunction · 0.36
test_w4a8Function · 0.36
test_ep4tp4_all2allFunction · 0.36
test_w4a8Function · 0.36
test_pd_separationFunction · 0.36
test_mtp_modeFunction · 0.36
test_vl_modelFunction · 0.36
test_ep4tp4_onlineFunction · 0.36
test_pd_separationFunction · 0.36