Open lix19937 opened 2 months ago
We need make sure trt engine < cuda ctx in life range.
https://github.com/NVIDIA/TensorRT/issues/2052#issuecomment-1155361468
https://stackoverflow.com/questions/4775579/main-and-scoping-in-python
Variables in the current modules global scope are visible everywhere in the module -- this rule also holds for the main module.
if __name__ == "__main__": foo = "bar"
defines a global variable named foo in that script. so any function of that module will have access to it.
The piece of code listed above is global to the module and not inside any function.
We need make sure trt engine < cuda ctx in life range.
https://github.com/NVIDIA/TensorRT/issues/2052#issuecomment-1155361468
https://stackoverflow.com/questions/4775579/main-and-scoping-in-python
Variables in the current modules global scope are visible everywhere in the module -- this rule also holds for the main module.
defines a global variable named foo in that script. so any function of that module will have access to it.
The piece of code listed above is global to the module and not inside any function.