Skip to content

Commit

Permalink
[chore] add callback
Browse files Browse the repository at this point in the history
  • Loading branch information
botbw committed Oct 29, 2024
1 parent 81b5c56 commit c615a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensornvme/async_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def write_raw(self, py_ref: object, buffer: int, n_bytes: int, offset: int) -> N

def write_tensor(self, tensor: Tensor) -> None:
self.buffers.append(tensor)
self.io.write_tensor(tensor, self.offset) # , partial(AsyncFileWriter.gc_callback, self.buffers, len(self.buffers) - 1))
self.io.write_tensor(tensor, self.offset, partial(AsyncFileWriter.gc_callback, self.buffers, len(self.buffers) - 1))
self.offset += tensor.numel() * tensor.element_size()

@staticmethod
Expand Down

0 comments on commit c615a13

Please sign in to comment.