When I make a custom op in tensorrt, in the preparation phase I see it is created initialized and terminated then destroyed a few times. However, sometimes I notice that it is terminated without being created, only initialized.
When could this happen? I guess I’d appreciate any additional information on the respective roles of terminate and destroy. Say my custom op requires a bunch of auxiliary data structures on the GPU. Should they be destroyed during terminate, or destroy?
I tried to have them destroyed during terminate, but sometimes this results in tensorrt trying to destroy things that hasn’t been created yet.