MCPcopy Create free account
hub / github.com/davisking/dlib / is_out_of_memory

Function is_out_of_memory

dlib/cuda/cudnn_dlibapi.cpp:791–799  ·  view source on GitHub ↗

Whether cuDNN failed for lack of memory, which benchmarking the algorithms can run into when the rest of the program is using the GPU at the same time.

Source from the content-addressed store, hash-verified

789 // Whether cuDNN failed for lack of memory, which benchmarking the algorithms can run into
790 // when the rest of the program is using the GPU at the same time.
791 bool is_out_of_memory(cudnnStatus_t status)
792 {
793#if CUDNN_MAJOR >= 9
794 return status == CUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILED ||
795 status == CUDNN_STATUS_INTERNAL_ERROR_DEVICE_ALLOCATION_FAILED;
796#else
797 return status == CUDNN_STATUS_ALLOC_FAILED;
798#endif
799 }
800
801 // The forward, backward data and backward filters algorithms chosen for each convolution
802 // configuration, with -1 for one not chosen yet. Once it has max_size configurations, it

Calls

no outgoing calls

Tested by

no test coverage detected