Created by: LeoZhao-Intel
This PR solves 2 issues:
- When Predictor.run is called in changed thread, it will make memory leak due to threadid is inserted into key, while each time key is different.
- For detect model, input dims are dynamic, not fixed, it will make conv/pool/concat mkldnn op memory leak due to each time key is different.
The solve method is to disable cache in this case, we extend EnableMKLDNN in AnaysisConfig, use parameter to control if cache is needed.
related #17611 (closed)