# CUDA - Failure to allocate bytes

**URL:** <https://community.konduit.ai/t/cuda-failure-to-allocate-bytes/259>\
**Category:** Uncategorized\
**Created:** [March 12, 2020, 6:29pm UTC](https://community.konduit.ai/t/cuda-failure-to-allocate-bytes/259 "2020-03-12T18:29:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddadel](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/siddadel/32/86_2.png) [@siddadel](https://community.konduit.ai/u/siddadel)\
**Post date:** [March 12, 2020, 6:29pm UTC](https://community.konduit.ai/t/cuda-failure-to-allocate-bytes/259/1 "2020-03-12T18:29:48Z")

</div>

Hi - I am trying to run VGG16 over 8000+ 224x224 images, batch size 32, 15 epochs.

The iterations do not begin, giving the following error:

Exception in thread “main” java.lang.RuntimeException: Failed to allocate 2027570444 bytes from DEVICE [0] memory

GPU: NVIDIA GTX 060, 6GB  
GPU Intel HD Graphics 630  
24GB RAM (13 GB of which is available)  
Intel Core 7th Gen

2020-03-13 00:12:41 INFO NativeOpsHolder:66 - Number of threads used for NativeOps: 32  
2020-03-13 00:12:43 INFO Nd4jBlas:54 - Number of threads used for BLAS: 0  
2020-03-13 00:12:43 INFO DefaultOpExecutioner:656 - Backend used: [CUDA]; OS: [Windows 10]  
2020-03-13 00:12:43 INFO DefaultOpExecutioner:657 - Cores: [8]; Memory: [5.3GB];  
2020-03-13 00:12:43 INFO DefaultOpExecutioner:658 - Blas vendor: [CUBLAS]  
2020-03-13 00:12:43 INFO CudaExecutioner:2188 - Device Name: [GeForce GTX 1060]; CC: [6.1]; Total/free memory: [6442450944]  
2020-03-13 00:12:43 INFO VGGClassifier:57 - Load data…

I have been trying to see detailed documentation on CUDNN and CUDA settings but haven’t found any details. Could you please help me figuring what the issue could be?

P.S: I have been able to run a similar VGG16 for a similar set of images on this same machine on Keras-GPU. It works perfectly.

---

<div class="post-metadata">

**Author:** ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)\
**Post date:** [March 13, 2020, 7:48am UTC](https://community.konduit.ai/t/cuda-failure-to-allocate-bytes/259/2 "2020-03-13T07:48:12Z")

</div>

Take a look at [https://deeplearning4j.konduit.ai/config/config-memory#configuring-memory-limits](https://deeplearning4j.konduit.ai/config/config-memory#configuring-memory-limits)

And configure more actual memory to be used. As you can see in the log snippet you’ve posted it will only use up to 5.3GB of memory.
