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

Method _buffer_view

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

Source from the content-addressed store, hash-verified

595 return view
596
597 def _sha256_tensor(tensor: Optional[torch.Tensor]) -> Optional[str]:
598 if tensor is None:
599 return None
600 data_tensor = tensor.detach()
601 if data_tensor.dtype == torch.bfloat16:
602 data_tensor = data_tensor.to(torch.float32)
603 data = data_tensor.contiguous().cpu().numpy().tobytes()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected