Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

add wait_tensor() after all_gather in float8 to fix mem leak #262

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions float8_experimental/float8_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def allgather_fp8(aten_op, args, kwargs=None):
fp8_data = fp8_data.view(torch.uint8)
fp8_data = fp8_data.contiguous()
fp8_out = aten_op(fp8_data, *args[1:], **kwargs)
fp8_out = torch.ops._c10d_functional.wait_tensor(fp8_out)
fp8_out = fp8_out.view(fp8_input._data.dtype)
return Float8Tensor(
fp8_out, fp8_input._scale, fp8_input._orig_dtype, fp8_input._mm_config
Expand Down
Loading