title: How to enable cuda unified memory in tensorflow v2
body: <p>In <code>tensorflow</code> 1.x, there is an option like <code>use_unified_memory</code> and <code>per_process_gpu_memory_fraction</code> which is potential to trigger CUDA UVM used. But how can this be done in <code>tensorflow</code> 2.0?</p>
  
  <p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto</a></p>
  
  <pre><code>// If true, uses CUDA unified memory for memory allocations. If
  // per_process_gpu_memory_fraction option is greater than 1.0, then unified
  // memory is used regardless of the value for this field. See comments for
  // per_process_gpu_memory_fraction field for more details and requirements
  // of the unified memory. This option is useful to oversubscribe memory if
  // multiple processes are sharing a single GPU while individually using less
  // than 1.0 per process memory fraction.
  bool use_unified_memory = 2;
  </code></pre>