-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: autogradRelated to torch.autograd, and the autograd engine in generalRelated to torch.autograd, and the autograd engine in generalmodule: cudaRelated to torch.cuda, and CUDA support in generalRelated to torch.cuda, and CUDA support in generaltriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
$ docker pull pytorch/pytorch:nightly-runtime-cuda10.0-cudnn7
$ docker run --runtime=nvidia -it --rm --ipc=host pytorch/pytorch:nightly-runtime-cuda10.0-cudnn7
Run the following script:
import torch
a = torch.tensor([1,2,3], dtype=torch.float32, device='cuda')
with torch.cuda.profiler.profile():
with torch.autograd.profiler.emit_nvtx():
b = a.sum()
Result:
root@0727b6d13c99:/data/sandbox_python/autograd_explore/profiler# python test.py
Traceback (most recent call last):
File "test.py", line 8, in <module>
with torch.autograd.profiler.emit_nvtx():
File "/opt/conda/lib/python3.6/site-packages/torch/autograd/profiler.py", line 398, in __enter__
self.record_shapes
AttributeError: 'emit_nvtx' object has no attribute 'record_shapes'
The offending line is simple:
https://github.com/pytorch/pytorch/blob/master/torch/autograd/profiler.py#L398
I'd submit a quick PR to fix it, but I'm not sure what you guys actually want the value of record_shapes to be for this call.
Metadata
Metadata
Assignees
Labels
module: autogradRelated to torch.autograd, and the autograd engine in generalRelated to torch.autograd, and the autograd engine in generalmodule: cudaRelated to torch.cuda, and CUDA support in generalRelated to torch.cuda, and CUDA support in generaltriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module