Skip to content

Commit

Permalink
Fix test_deallocate_output_tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyu-intel committed Jun 13, 2024
1 parent 7eb36a1 commit 930e956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/pipeline_parallel/test_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def test_get_forward_backward_func():
def test_deallocate_output_tensor():
out = torch.tensor([[1, 2, 3], [4, 5, 6]])
schedule.deallocate_output_tensor(out)
assert(out.nelement() == 1)
assert(out.nelement() == 6)
schedule.deallocate_output_tensor(out, True)
assert(out.nelement() == 1)

def test_forward_backward_func_without_pipeline_parallel(mocker):
from megatron.core.pipeline_parallel import get_forward_backward_func
Expand Down

0 comments on commit 930e956

Please sign in to comment.