Skip to content

Commit

Permalink
add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu committed Jan 10, 2024
1 parent 0b5470a commit fe580a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/paddle/distributed/auto_parallel/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def _init_func(var, block):
dist_tensor = paddle.Tensor(
tensor, process_mesh=mesh, placements=placements, place=place
)
# InitDistTensorWithTensor won't pass the stop gradient attribute,
# have to pass it manually.
dist_tensor.stop_gradient = tensor.stop_gradient
return dist_tensor
else:
Expand Down

0 comments on commit fe580a3

Please sign in to comment.