Hi, I’ve just try amp with pytorch yesterday with a Pascal gtx 1070.
I just which to “extend the gpu vram” using mixed precision.
Following the tutorial and increasing different parameters i saw that mixed precision is slower (for the Pascal GPU which seems normal) but the memory usage is higher with that GPU.
To verify that the : torch.cuda.max_memory_allocated() value represents really the memory usage, i found parameters for which the fp32 finishs the job but the mixed precision gives a RuntimeError: CUDA out of memory error.
I just try different values for the batch size and find a special value of 3860 that gives memory error only for the mixed precision.
In that case : the script shows : Default precision:
Total execution time = 42.469 sec
Max memory used by tensors = 7092684288 bytes
File “C:\Users\33661\miniconda3\envs\torch\lib\site-packages\torch\autograd_init_.py”, line 156, in backward
allow_unreachable=True, accumulate_grad=True)  # allow_unreachable flag
RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 8.00 GiB total capacity; 6.59 GiB already allocated; 0 bytes free; 6.73 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
It was pytorch 1.10 with cuda 11.3 and cudnn 8.2
I try with pytorch 1.7.1 ; cuda 10.1 and cudnn 7.6 with analog results.
I would like to know which version of pytorch, cuda and cudnn (maybe not important?) allow to show a reduction of memory usage with the tutorial script which is well done.
Maybe this problem is due to cuda version?
I try some basic convolutional neural network and always the mixed precision use more gpu vram.
I wonder if the mixed precision for the moment does its principle job : allow to use bigger networks and batchsize.
I will try older pytorch versions and will  try to use apex.amd to see if theses problem always remained.
I test tensorflow.keras for small convolutional nets with mnist data and always find memory usage reduction with mixed precision. The speed could  decrease  for small networks with the gtx 1070 without tensor core.
I find the pytorch tutorial marvelous and love pytorch in general but if i need mixed precision i will use surely another framework.