Tensorflow OOM with AMP, but not with non-AMP !!

This one is a surprise. One of the purported benefits of AMP apparently is less memory usage. However observed just opposite. Even more surprising is NVML reported around 40% memory utilization , although nvidia-smi showed tensorflow taking up almost 84% . Why is this alloc then OOM’ed ? Is there a workaround short of reducing the tensor ?

2019-05-23 10:01:03,894 main ERROR Caught exception in : OOM when allocating tensor with shape[3893,2048,7,7] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[{{node …Conv2D-0-CastToFp32-AutoMixedPrecision}}]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

     [[node ... ]]

Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

values = self.sess.run(ops, feed_dict=feed_dict)

File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 929, in run
run_metadata_ptr)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1152, in _run
feed_dict_tensor, options, run_metadata)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1328, in _do_run
run_metadata)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1348, in _do_call
raise type(e)(node_def, op, message)
ResourceExhaustedError: OOM when allocating tensor with shape[3893,2048,7,7] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[{{node …Conv2D-0-CastToFp32-AutoMixedPrecision}}]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

     [[node ... ]]

Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

Anyone able to offer any insight ?