Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mlazos committed Jun 2, 2023
1 parent f71c79e commit 46ae2d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torch/optim/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def wrapper(*args, **kwargs):

@staticmethod
def _group_tensors_by_device_and_dtype(tensorlistlist, with_indices=False):
"""Groups a list of lists of tensors by device and dtype.
Skips this step if we are compiling since this will occur during inductor lowering."""
if is_compiling():
if with_indices:
indices = list(range(len(tensorlistlist[0])))
Expand Down

0 comments on commit 46ae2d4

Please sign in to comment.