0

しばらく実行した後に Cuda のメモリ不足例外をスローするスクリプトがいくつかあります。それらの内部では、事前に割り当てられた配列を使用しているため、これが問題になるとは思っていませんでした。それにもかかわらず、スクリプトを .fs ファイルに変換してコンパイルした後、プロファイラーはこのタスクには特に役に立たず、cuda-memcheck ツール 6.5 (36) を使用すると CudaInterOp 例外がスローされました。cuda-memcheck 7.0 (40) は、GPU が故障したため、実際に PC を強制的にリセットさせました。

私は現時点で何をすべきかについて少し確信が持てません。Aleaでリークを修正するにはどうすればよいですか?

4

1 に答える 1

1

device reduce のリソース管理を完全に使用すると、次のようになります。

// first, create module, which has the compilation stuff
use reduceModule = new DeviceReduceModule<float>(Target, <@ (+) @>) 
// second, create a reduce object, which contains temp memory for that maxItems
use reduce = reduceModule.Create(maxItems)
// third, allocate your device memory for input
use numbers = reduce.AllocateStreamBuffer(xxx)
// now you can scatter data and do reduce
numbers.Scatter(your data)
reduce.Reduce(numbers)
// now because you are using "use" keyword, the dispose() will be called implicitly
于 2015-09-07T03:21:11.237 に答える