MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / _buffer_view

Method _buffer_view

lightx2v/disagg/services/decoder.py:208–211  ·  view source on GitHub ↗
(buf: torch.Tensor, dtype: torch.dtype, shape: tuple[int, ...])

Source from the content-addressed store, hash-verified

206 if receiver is None:
207 raise RuntimeError(f"DataReceiver is not initialized in DecoderService for room={room}.")
208 if room_buffers is None:
209 raise RuntimeError(f"No RDMA buffer available in DecoderService for room={room}.")
210
211 def _buffer_view(buf: torch.Tensor, dtype: torch.dtype, shape: tuple[int, ...]) -> torch.Tensor:
212 view = torch.empty(0, dtype=dtype, device=buf.device)
213 view.set_(buf.untyped_storage(), 0, shape)
214 return view

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected