【发布时间】:2017-06-02 23:41:54
【问题描述】:
以下问题不是关于如何config fraction of gpu memory used。
CPU:
FixedLengthRecordReaderV2 allocation_description { requested_bytes: 64 分配字节:64 分配器名称:“cpu”分配ID:107996
GPU:
重塑/形状”张量 { dtype: DT_INT32 shape { dim { size: 1 } } 分配描述{请求字节:4分配字节:256 分配器名称:“cuda_host_bfc”分配ID:329 ptr:1112161657600 } } }
“未知”张量 { dtype: DT_UINT8 shape { dim { size: 3073 } } 分配描述{请求字节:3073分配字节:3328 分配器名称:“gpu_bfc”分配ID:152161 has_single_reference: 真正的指针:1108327235584 } } }
重塑/形状”张量 { dtype: DT_INT32 shape { dim { size: 1 } } 分配描述{请求字节:4分配字节:256 分配器名称:“cuda_host_bfc”分配ID:329 ptr:1112161657600 } } }
DecodeRaw" 张量 { dtype: DT_UINT8 shape { dim { size: 3073 } } 分配描述{请求字节:3073分配字节:4864 分配器名称:“cuda_host_bfc”分配ID:35574 has_single_reference: true ptr: 1112190177280 } } }
转置/烫发”张量 { dtype: DT_INT32 shape { dim { size: 3 } } 分配描述{请求字节:12分配字节:256 分配器名称:“cuda_host_bfc”分配ID:331 ptr:1112161658112 } } }
stack" 张量 { dtype: DT_INT32 shape { dim { size: 3 } } 分配描述{请求字节:12分配字节:256 分配器名称:“cuda_host_bfc”分配ID:332 ptr:1112161658368 } } }
stack" 张量 { dtype: DT_INT32 shape { dim { size: 3 } } 分配描述{请求字节:12分配字节:256 分配器名称:“cuda_host_bfc”分配ID:332 ptr:1112161658368 } } }
stack" 张量 { dtype: DT_INT32 shape { dim { size: 3 } } 分配描述{请求字节:12分配字节:256 分配器名称:“cuda_host_bfc”分配ID:332 ptr:1112161658368 } } }
1.为什么tensorflow分配的内存比gpu请求的多?
2.有什么函数可以判断分配了多少内存吗?
对于第一个问题,我做客的目的是为了减少分配的频率。但是我不明白为什么 gpu 采用了这种机制,而 cpu 内存分配器却没有。
我对第二个问题更感兴趣。
有人知道答案吗?任何信息都会有所帮助。
【问题讨论】:
-
不重复 (-:
标签: memory-management tensorflow