Skip to content

New Feature: Pascal, Cuda 8, Unified memory #3678

Closed

Description

Hi,

As Cuda 8 enables unified memory for Pascal GPU, combining CPU and GPU on the same address level, and enhancing the memory size available for GPU (with limited latency), using CPU RAM.

  1. Is there a possibility to have larger than GPU ram NN+data (lower than CPU ram) for training in tensor flow ? (it would help reducing distributed computing/network latency) ?

ie, using the idea of Oversubscribe GPU memory for large dataset/models.

here, CUDA API :
http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-simplifying

Example of 64GB allocation on GPU:

void foo() {
// Allocate 64 GB on GPU, using CPU RAM
char *data;
size_t size = 64*1024*1024*1024;
cudaMallocManaged(&data, size);
}

Activity

  1. added
    stat:awaiting tensorflower
    on Aug 7, 2016
  2. zheng-xq commented on Aug 7, 2016

    @zheng-xq
    Contributor

    UVM is implemented through page-fault between CPU and GPU. It makes GPU program easier to be adopted, but not necessarily as fast as possible. Without more investigation, we are not sure this is suitable for high-performance machine learning. Note that the typical bandwidth across PCIE is often about two orders of magnitude slower than accessing the GPU dram itself.

    If the model is indeed too large and cannot fit into GPU memory, it may make sense to load parts of the model in parallel, instead of relying the page faults in the kernels to page in the data.

  3. arita37 commented on Aug 9, 2016

    @arita37

    Cuda 8 with Pascal has Nvlink which is 80Gb/sec, so Latency is very low between RAM.
    It allows to create larger than GPU memory through single memory allocation,
    At very low latency. Performance would be enhanced.

    See the slides.

  4. zheng-xq commented on Aug 9, 2016

    @zheng-xq
    Contributor

    My understanding was that 80GB/s was between devices. The CPU/GPU communication through PCIE used by UVM is only a small fraction of that. And they are both much smaller than the 720GB/s when GPU accessing its own memory.

    This is an active research area, and we might still find a good use of UVM down the road. But the current belief is that it is better to page in/out memory with CPU in parallel, while the compute engine on GPU accesses its own memory in full speed. A good example is the "swap_memory" option in "tf.while_loop", which swaps the temporary memory created in the loop to the host, when the device memory is under pressure.

  5. added
    type:feature
    on Mar 1, 2017
  6. yaroslavvb commented on Oct 3, 2017

    @yaroslavvb
    Contributor

    initial support added in cd4f5840

  7. evolu8 commented on Oct 19, 2017

    @evolu8

    UVM support throughout would be of enormous benefit. I would be very keen to see this implemented. Having ideal training throughput is often less important than coping with large input and large model sizes which simply fail to fit on a card.

  8. byronyi commented on Oct 19, 2017

    @byronyi
    Contributor

    Looks like another “we don’t need distributed transactions in Google so we choose to let users implement crappy/wrong versions of their own” for BigTable/MegaStore.

    Now we have Spanner :)

  9. ranshadmi commented on Oct 21, 2017

    @ranshadmi

    +1 for "UVM support throughout"!

  10. Orna123 commented on Oct 22, 2017

    @Orna123

    +1 for "UVM support throughout"!

  11. evolu8 commented on Nov 10, 2017

    @evolu8

    Any movement on this?

    Cheers

  12. tarlovsky commented on May 30, 2018

    @tarlovsky

    Hey guys, any progress? Highly interested!

  13. smit-hinsu commented on Jun 16, 2018

    @smit-hinsu
    Contributor

    UVM support was added recently in b1139814.

  14. removed
    stat:awaiting tensorflower
    on Jun 16, 2018
  15. donglinjy commented on Nov 25, 2019

    @donglinjy

    @smit-hinsu do you know how uvm can be used in Tensorflow 2.0?

  16. smit-hinsu commented on Nov 25, 2019

    @smit-hinsu
    Contributor

    @donglinjy I don't think uvm configuration is exposed in TF 2.0. Please file a separate feature request for that.

    cc @aaroey @jaingaurav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type:feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions