MCPcopy Create free account
hub / github.com/NVlabs/LongLive / _tensor_nbytes

Function _tensor_nbytes

utils/quant.py:419–422  ·  view source on GitHub ↗
(tensor: torch.Tensor | None)

Source from the content-addressed store, hash-verified

417
418
419def _tensor_nbytes(tensor: torch.Tensor | None) -> int:
420 if tensor is None:
421 return 0
422 return tensor.numel() * tensor.element_size()
423
424
425def _materialize_transformer_engine_weights_for_inference(

Calls

no outgoing calls

Tested by

no test coverage detected