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

PyTorch 1.6 function name modification #555

Closed
Lornatang opened this issue Jul 30, 2020 · 1 comment · Fixed by #573
Closed

PyTorch 1.6 function name modification #555

Lornatang opened this issue Jul 30, 2020 · 1 comment · Fixed by #573
Labels
enhancement New feature or request

Comments

@Lornatang
Copy link
Contributor

Error:

/home/unix/miniconda3/lib/python3.8/site-packages/torch/cuda/memory.py:344: FutureWarning: torch.cuda.memory_cached has been renamed to torch.cuda.memory_reserved

raw:

# for https://github.com/ultralytics/yolov5/blob/adaf1d8ac109f5c0977c27ceb3c2165a9c619cf2/train.py#L315
                mem = '%.3gG' % (torch.cuda.memory_cached() / 1E9 if torch.cuda.is_available() else 0)  # (GB)

new:

                mem = '%.3gG' % (torch.cuda.memory_reserved() / 1E9 if torch.cuda.is_available() else 0)  # (GB)
@Lornatang Lornatang added the enhancement New feature or request label Jul 30, 2020
@Lornatang Lornatang changed the title PyTorch 1.6 function variable name modification PyTorch 1.6 function name modification Jul 30, 2020
@glenn-jocher
Copy link
Member

Thanks, I see the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants