ptrblck:

CUDA_VISIBLE_DEVICES=1 python -m torch.utils.bottleneck


CUDA_VISIBLE_DEVICES=1, doesnt work for me. Instead  I have to use CUDA_VISIBLE_DEVICES=0 for it to run on GPU.
However, now when I run with  CUDA_VISIBLE_DEVICES=1 python -m torch.utils.bottleneck script.py args, i get the following error
RuntimeError: /opt/conda/conda-bld/pytorch_1544174967633/work/torch/csrc/autograd/profiler.h:72: out of memory