使用Intel Inspector執行OpenVINO™ C++樣品時,如何避免記憶體漏漏問題。
- Ran OpenVINO™ 影像分類 Async C++範例使用Intel® Inspector檢查記憶體問題。
使用的命令:
$ pwd
/home/centos/inference_engine_cpp_samples_build/intel64/Release
$ /opt/intel/oneapi/inspector/2021.3.0/bin64/inspxe-cl -c mi3 ./classification_sample_async -m /opt/intel/openvino_2021.3.394/deployment_tools/open_model_zoo/tools/downloader/intel/image-retrieval-0001/FP16-INT8/image-retrieval-0001.xml -i /home/centos/images -nt 8
$ /opt/intel/oneapi/inspector/2021.3.0/bin64/inspxe-cl -report observations - Intel® Inspector產生詳細記錄記憶體問題的報告。
效能標竿應用程式被用作參考,以最大化推斷效能。效能標竿應用程式中有一些與延遲統計資料相關的代碼。
移除 代碼的相關片段將使記憶體穩定
不建議使用benchmark_app應用程式進行壓力測試,因為它使用InferRequestsQueue類別中的私人std::vector_latencies,該類別會收集每一個延遲值並計算延遲的中值。