在tensorflow1.x 中,有一个选项,如use_unified_memory和per_process_gpu_memory_fraction有可能触发使用的 CUDA UVM。但是如何在tensorflow2.0 中做到这一点呢?
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto
// 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 …Run Code Online (Sandbox Code Playgroud)