(buf: torch.Tensor, dtype: torch.dtype, shape: tuple[int, ...])
| 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() |
nothing calls this directly
no outgoing calls
no test coverage detected