File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,16 @@ limitations under the License. */
19
19
#include " gflags/gflags.h"
20
20
#include " paddle/fluid/platform/enforce.h"
21
21
22
+ #ifndef _WIN32
23
+ const float fraction_of_gpu_memory_to_use = 0 .92f ;
24
+ #else
22
25
// fraction_of_gpu_memory_to_use cannot be too high on windows,
23
26
// since the win32 graphic sub-system can occupy some GPU memory
24
27
// which may lead to insufficient memory left for paddle
25
- DEFINE_double (fraction_of_gpu_memory_to_use, 0.5 ,
28
+ const float fraction_of_gpu_memory_to_use = 0 .5f ;
29
+ #endif
30
+
31
+ DEFINE_double (fraction_of_gpu_memory_to_use, fraction_of_gpu_memory_to_use,
26
32
" Allocate a trunk of gpu memory that is this fraction of the "
27
33
" total gpu memory size. Future memory usage will be allocated "
28
34
" from the trunk. If the trunk doesn't have enough gpu memory, "
You can’t perform that action at this time.
0 commit comments