mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-04-28 11:45:23 +00:00
[tmp] add write_tensor
This commit is contained in:
parent
ad6558e91c
commit
ff14144d9c
@ -61,4 +61,4 @@ def save(f_writer: AsyncFileWriter, state_dict: Dict[str, torch.Tensor]) -> None
|
|||||||
f_writer.write(header_bytes)
|
f_writer.write(header_bytes)
|
||||||
|
|
||||||
for tensor in tensors:
|
for tensor in tensors:
|
||||||
f_writer.write_raw(tensor, tensor.data_ptr(), tensor.numel() * tensor.element_size(), f_writer.offset)
|
f_writer.write_tensor(tensor)
|
||||||
|
Loading…
Reference in New Issue
Block a user