Closed loeffel-io closed 2 years ago
Hi Ioeffel,
Seems to me that you are missing a call to Dispose on the worker itself. Please see: https://docs.unity3d.com/Packages/com.unity.barracuda@2.4/manual/MemoryManagement.html
Important note:
When calling worker.Destroy() the tensor retrieved here
var output = worker.PeekOutput("output_1");
will also be released/dispose. You might want to use .CopyOutput() or .TakeOwnerShip()
depending of your use case.
Finally tensor obtained via .PeekOutput();
are only valid until the next call to worker.Execute()
call, if you need the data further using .CopyOutput() or .TakeOwnerShip()
is also the solution.
Hope it helps :) Florent
I'm closing the issue as i feel the question was answered. Please reopen if needed!
Thanks ❤️
The problem were undisposed inputs - made it!
Hello,
i am using the
barracuda-2.4
package.As described here https://docs.unity3d.com/Packages/com.unity.barracuda@2.4/manual/MemoryManagement.html and here https://docs.unity3d.com/Packages/com.unity.barracuda@2.4/manual/TensorHandling.html i am clearing the worker and inputs onDestroy.
Everything works as expected as long i am stop the application:
as there anything i am doing wrong?
thanks