Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ tensor_to_bytes
Function
tensor_to_bytes
deepspeed/io/utils.py:19–20 ·
view source on GitHub ↗
(tensor)
Source
from the content-addressed store, hash-verified
17
18
19
def
tensor_to_bytes(tensor):
20
return
tensor.numpy().tobytes()
21
22
23
def
bytes_to_tensor(buffer):
Callers
1
_unaligned_drain
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected