Information About Configuring GPU Usage Limits for tensorflow

Asked 1 years ago, Updated 1 years ago, 121 views

When running tensorflow on a machine with only one GPU,

gpuConfig=tf.ConfigProto(
    gpu_options=tf.GPUOptions(per_process_gpu_memory_fraction=0.5),
    device_count = {'GPU':0})

with tf.Session(config=gpuConfig) asess:

When configured with , the nvidia-smi command shows that the program has only about 25 MiB of memory in the GPU memory usage area, even though it has more than 1 GiB of free memory.
How can we solve this problem?I would appreciate it if someone could tell me.

tensorflow gpu

2022-09-30 21:22

1 Answers

The device_count specifies the number of devices to use for calculation, so I think it is right to set 1 in this case.
Also, it's to limit the number of devices used, so if you want to use one GPU on a single machine, you don't need to set it up in the first place.

The following is a detailed explanation.
http://qiita.com/kikusumk3/items/907565559739376076b9


2022-09-30 21:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.