GPU Memory Allocation Limits
- Dominant language
- Python
- Stars
- 133
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
There could be a command line option to set the max GPU memory allocation. By default tensorflow pre-allocates 100% of the GPU memory. If its not needed, then enabling the user to set the appropriate limit could help with GPU sharing. Example code for tensorflow is the following:
## extra imports to set GPU options
import tensorflow as tf
from keras import backend as k
###################################
# TensorFlow wizardry
config = tf.ConfigProto()
# Don't pre-allocate memory; allocate as-needed
config.gpu_options.allow_growth = True
# Only allow a total of half the GPU memory to be allocated
config.gpu_options.per_process_gpu_memory_fraction = 0.1
# Create a session with the above options specified.
k.tensorflow_backend.set_session(tf.Session(config=config))
###################################
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.