CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

ASGD: ~MultiversoHelper CUDA out of memory failure during validation [cvreader] (Beta 11 GPU 1b binary)

Open ghost opened this issue 9 years ago • 1 comments

Training crashes when processing [cvreader] / cross-validation on nonhomogeneous multi-host multi-GPU configuration

CUDA failure 2: out of memory ; GPU=0 ; hostname=xyz ; expr=cudaMalloc((void**) &deviceBufferPtr, sizeof(AllocatedElemType) * numElements)
~MultiversoHelper

Minibatch size chosen to load RAM usage to 75%< for the smallest (memory size wise) GPU. Hosts that continued calculations showed ~double memory usage for the validation vs training stages.

Is this due to minibatch partitioning or something else? The model uses KLD and is similar to the one documented on cntk wiki Clone function and epochSize is less than entire dataset.

PS: after all other nodes finish the following is logged:

[INFO] [2017-02-17 10:32:25] Multiverso Shutdown successfully
~MPIWrapper


[CALL STACK]
    > Microsoft::MSR::CNTK::CudaTimer::  Stop
    - Microsoft::MSR::CNTK::CudaTimer::  Stop
    - Microsoft::MSR::CNTK::GPUMatrix<float>::  Resize
    - Microsoft::MSR::CNTK::Matrix<float>::  Resize
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2
    - Microsoft::MSR::CNTK::Matrix<float>::  __autoclassinit2

EXCEPTION occurred: CUDA failure 2: out of memory ; GPU=0 ; hostname=xyz ; expr=cudaMalloc((void**) &deviceBufferPtr, sizeof(AllocatedElemType) * numElements)

There is no reason to crash out without building in restart possibility if one of the nodes falls ! Also, doing checkpoint save before [cvreader] would be useful.

ghost avatar Feb 17 '17 07:02 ghost

Hi @avader906 , that's a bug. Due to the distributed reader settings, the eval size couldn't fit into one GPU. so we adjust the logic for the eval.

chivee avatar Mar 14 '17 07:03 chivee