mitsuba-renderer / drjit

Dr.Jit — A Just-In-Time-Compiler for Differentiable Rendering
BSD 3-Clause "New" or "Revised" License
572 stars 40 forks source link

How can I free drjit memory pool? #178

Closed mlamarre closed 1 year ago

mlamarre commented 1 year ago

I'm porting existing code from mitsuba2/enoki, I didn't find the drjit function to release the cuda memory pool which was available in ek. Thanks!

mlamarre commented 1 year ago

Found the answer in mitsuba3 (maybe only dr.flush_malloc_cache is required):

dr.kernel_history_clear()
dr.flush_malloc_cache()
dr.malloc_clear_statistics()
dr.flush_kernel_cache()