Use TensorRT, CUDA and ORT version fetched at runtime to get the hash value which determines the cache name.
The old way to get the version is at compile/build time that might have some issues in some cases,
ex:
TRT EP uses the TRT version which we or users built against at compile time.
However, users can change different TRT version at run time, that can cause issue because TRT EP always checks the "fixed" TRT version, not the TRT version it uses now. This can cause TRT EP to use incompatible TRT engine cache.
Use TensorRT, CUDA and ORT version fetched at runtime to get the hash value which determines the cache name.
The old way to get the version is at compile/build time that might have some issues in some cases, ex: TRT EP uses the TRT version which we or users built against at compile time. However, users can change different TRT version at run time, that can cause issue because TRT EP always checks the "fixed" TRT version, not the TRT version it uses now. This can cause TRT EP to use incompatible TRT engine cache.
see the github issue here: https://github.com/microsoft/onnxruntime/issues/22382#issuecomment-2404140754