pytorch
0057be33 - [CUDA graphs] Add warning if captured graph is empty (#88754)

Commit
3 years ago
[CUDA graphs] Add warning if captured graph is empty (#88754) Fixes #87894 This PR adds a warning if captured graph is empty (consists of zero nodes). The example snippet where would it be useful: ```python import torch x = torch.randn(10) z = torch.zeros(10) g = torch.cuda.CUDAGraph() with torch.cuda.graph(g): z = x * x # Warn user ``` and in #87894 Pull Request resolved: https://github.com/pytorch/pytorch/pull/88754 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading