Skip to content

Have global_norm properly handle when input consists of only None#1832

Merged
QuantuMope merged 1 commit intopytorchfrom
PR/andrew/global-norm-fix
Mar 27, 2026
Merged

Have global_norm properly handle when input consists of only None#1832
QuantuMope merged 1 commit intopytorchfrom
PR/andrew/global-norm-fix

Conversation

@QuantuMope
Copy link
Copy Markdown
Contributor

global_norm can handle if the input has at least one non-None tensor but will crash if the input arg consists of only Nones. This fix handles the later case.

@QuantuMope QuantuMope merged commit cef267e into pytorch Mar 27, 2026
2 checks passed
@QuantuMope QuantuMope deleted the PR/andrew/global-norm-fix branch March 27, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants