2016-02-02 4 views
60

私は次のメッセージを参照してくださいtensorflowのseq2seqモデルを訓練しながら:テンソルフローでのPoolallocatorメッセージの解釈方法

 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 27282 get requests, put_count=9311 evicted_count=1000 eviction_rate=0.1074 and unsatisfied allocation rate=0.699032 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 100 to 110 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 13715 get requests, put_count=14458 evicted_count=10000 eviction_rate=0.691659 and unsatisfied allocation rate=0.675684 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 110 to 121 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 6965 get requests, put_count=6813 evicted_count=5000 eviction_rate=0.733891 and unsatisfied allocation rate=0.741421 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 133 to 146 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 44 get requests, put_count=9058 evicted_count=9000 eviction_rate=0.993597 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 46 get requests, put_count=9062 evicted_count=9000 eviction_rate=0.993158 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 4 get requests, put_count=1029 evicted_count=1000 eviction_rate=0.971817 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 2 get requests, put_count=1030 evicted_count=1000 eviction_rate=0.970874 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 44 get requests, put_count=6074 evicted_count=6000 eviction_rate=0.987817 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 12 get requests, put_count=6045 evicted_count=6000 eviction_rate=0.992556 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 2 get requests, put_count=1042 evicted_count=1000 eviction_rate=0.959693 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 44 get requests, put_count=6093 evicted_count=6000 eviction_rate=0.984737 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 4 get requests, put_count=1069 evicted_count=1000 eviction_rate=0.935454 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 17722 get requests, put_count=9036 evicted_count=1000 eviction_rate=0.110668 and unsatisfied allocation rate=0.550615 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 792 to 871 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 6 get requests, put_count=1093 evicted_count=1000 eviction_rate=0.914913 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 6 get requests, put_count=1101 evicted_count=1000 eviction_rate=0.908265 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 3224 get requests, put_count=4684 evicted_count=2000 eviction_rate=0.426985 and unsatisfied allocation rate=0.200062 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 1158 to 1273 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 17794 get requests, put_count=17842 evicted_count=9000 eviction_rate=0.504428 and unsatisfied allocation rate=0.510228 
I tensorflow/core/common_runtime/gpu/pool_allocator.cc:239] Raising pool_size_limit_ from 1400 to 1540 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 31 get requests, put_count=1185 evicted_count=1000 eviction_rate=0.843882 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 40 get requests, put_count=8209 evicted_count=8000 eviction_rate=0.97454 and unsatisfied allocation rate=0 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 0 get requests, put_count=2272 evicted_count=2000 eviction_rate=0.880282 and unsatisfied allocation rate=-nan 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 0 get requests, put_count=2362 evicted_count=2000 eviction_rate=0.84674 and unsatisfied allocation rate=-nan 
W tensorflow/core/common_runtime/gpu/pool_allocator.cc:227] PoolAllocator: After 38 get requests, put_count=5436 evicted_count=5000 eviction_rate=0.919794 and unsatisfied allocation rate=0 

それが何を意味する

、それは私はいくつかのリソース割り当ての問題が生じています意味ですか? Titan X 3500+ CUDA、12 GB GPUで動作しています

答えて

75

TensorFlowには、さまざまな方法で使用されるメモリ用の複数のメモリアロケータがあります。彼らの行動にはいくつかの適応的側面があります。

具体的には、GPUを使用しているため、高速DMA用にGPUにあらかじめ登録されているCPUメモリ用のPoolAllocatorがあります。例えば、CPUからGPUに転送されると予想されるテンソルがこのプールから割り当てられる。

PoolAllocatorsは、即座に再利用できる割り当て済みの解放されたチャンクのプールを保持することによって、より高価な基礎となるアロケータを呼び出すコストを償却しようとします。それらのデフォルト動作は、エビクションレートが一定以下になるまでゆっくりと増加することです。 (追い出し率は、サイズ制限を超えないように、未使用のチャンクをプールから元のプールに返す空きコールの割合です)。上記のログメッセージでは、プールを示す「pool_size_limit_を上げる」行が表示されますサイズが大きくなる。あなたのプログラムが実際に必要なチャンクの最大サイズの集合を持つ安定した状態の動作をしていると仮定すると、プールはそれを収容するように成長し、それ以上は成長しません。まれにしか必要とされないか、プログラムの起動時にしか必要とされないサイズがプールに保持される可能性が低くなるように、割り当てられたすべてのチャンクを保持するのではなく、この方法で動作します。

これらのメッセージは、メモリが不足している場合にのみ問題となります。このような場合、ログメッセージは問題の診断に役立ちます。ピーク実行速度は、メモリプールが適切なサイズに成長した後にのみ達成されることにも注意してください。

+8

GPUアーキテクチャの専門知識のない人にとっては理解しやすい回答ではありません。それにもかかわらず、ありがとう! – stpk

+0

これに基づいてこの質問に答えることができます:http://stackoverflow.com/questions/35171405/how-to-determine-maximum-batch-size-for-a-seq2seq-tensorflow-rnn-training-model – stackit

+0

As付録、私は[ここにコード](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/gpu/pool_allocator.cc#L213)は理解するのに便利だと思います。 TFは定期的に退去率をチェックし、退去率と不満足率がすべて一定数(そこに0.003)あれば、それは限界を増加させるようです。 –

関連する問題