Thanks for bringing up this topic. We might need to consider the scenarios we 
want to use relay and design under those constraints. For now the main use 
cases is inference(maybe training in the future). I guess most of the objects 
allocated during inference will be `TensorObject`, plus a few `DatatypeObject`, 
we can run some benchmarks for major models to confirm. `TensorObject` 
shouldn't cause cyclic reference, and if it's the majority of the objects, we 
can handle them with existing reference counting. And for the remaining 
`DatatypeObject`, a mark sweep GC can be called infrequently. But **benchmark 
first**. :-)

Agree sharing GC. For AOT, should we learn how rust get rid of GC as a further 
optimization? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dmlc/tvm/issues/3423#issuecomment-504807018

Reply via email to