Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUDA][AMP] Size-1 (scalar) norms are broken on CUDA + AMP following #122143 #125174

Closed
eqy opened this issue Apr 29, 2024 · 0 comments
Closed

[CUDA][AMP] Size-1 (scalar) norms are broken on CUDA + AMP following #122143 #125174

eqy opened this issue Apr 29, 2024 · 0 comments
Labels
module: amp (automated mixed precision) autocast module: cuda Related to torch.cuda, and CUDA support in general module: norms and normalization triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@eqy
Copy link
Collaborator

eqy commented Apr 29, 2024

🐛 Describe the bug

A corner case of AMP + norm seems broken after #122143

import torch

inp = torch.randn(1, device='cuda', dtype=torch.half)
with torch.autocast('cuda', dtype=torch.float16):
    torch.linalg.vector_norm(inp)

CC @Aidyn-A who is working on a fix
@min-jean-cho
@nWEIdia @tinglvv

Versions

Current nightlies

cc @ptrblck @mcarilli @leslie-fang-intel @jgong5

@eqy eqy added module: cuda Related to torch.cuda, and CUDA support in general module: amp (automated mixed precision) autocast module: norms and normalization labels Apr 29, 2024
@eqy eqy changed the title [CUDA][AMP] Size-1 (scalar) norms are broken on CUDA following #122143 [CUDA][AMP] Size-1 (scalar) norms are broken on CUDA + AMP following #122143 Apr 29, 2024
@cpuhrsch cpuhrsch added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: amp (automated mixed precision) autocast module: cuda Related to torch.cuda, and CUDA support in general module: norms and normalization triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants