-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TensorRT EP] How can I disable generating cache when using trt execution provider #22822
Comments
Hi @noahzn Your old engine/profile might not be reused by TRTEP if current inference param/cache name/env variables/HW env changes. Here's more info about engine reusability: https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#trt_engine_cache_enable I wonder if you update your old engine/profile with newly generated ones, is that new engine going to be reused? or a newer engine need to be generated |
@yf711 Thanks for your reply! |
It's not related to dimension ranges in the intermediate layers input. The engine cache name,
Also, the cache name contains compute capability, e.g. sm80. Is any of metadata above changes between the run that generated the cache and the run that supposed to use the old cache? |
@chilo-ms Thanks for your reply. I don't think the above metadata changes. The model's file name is never changed, the input names of the graph are fixed in the onnx model. Concerning the graph, since the numbers of keypoints are different, it may be changed. So now I try to set min. and max. shape of some middle layers and seems now it generates new caches less frequently than before. For example, these are the cached files in the folder.
|
I have already generated some trt cache when infering my ONNX model using TRT Execution Provider. Then, for the online testing of my model, I set
so.graph_optimization_level = ort.GraphOptimizationLevel.ORT_DISABLE_ALL
, but it seems that still new caches are generated. I only want to reuse the old cache while not generating new cache. How can I do that? Thanks in advance!The text was updated successfully, but these errors were encountered: