-
For example, I want to cauculate: Can ary.data.release free the memory used by ary? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For another example:
Look at the task manager, 4 increase in memory comsumption can be observed (by adding breakpoint() between every line), but no decrease. |
Beta Was this translation helpful? Give feedback.
-
Memory will be freed after the last reference to an object goes away. At To manually free memory (technically: release the reference to the buffer, because OpenCL has its own refcounting): https://documen.tician.de/pyopencl/runtime_memory.html#pyopencl.MemoryObject.release i.e.
|
Beta Was this translation helpful? Give feedback.
Memory will be freed after the last reference to an object goes away. At
x = b**2
, the local variablesa
andb
are still holding references to the input arrays.To manually free memory (technically: release the reference to the buffer, because OpenCL has its own refcounting): https://documen.tician.de/pyopencl/runtime_memory.html#pyopencl.MemoryObject.release
i.e.