Skip to content

Commit 0b8d7f9

Browse files
committed
Modified samples with changes in device_type and updated README instructions
1 parent fd6041d commit 0b8d7f9

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

c_cxx/OpenVINO_EP/Windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ option(OPENCL_INCLUDE "OpenCL header dir")
1717
if(NOT ONNXRUNTIME_ROOTDIR)
1818
set(ONNXRUNTIME_ROOTDIR "C:/Program Files/onnxruntime")
1919
endif()
20-
include_directories("${ONNXRUNTIME_ROOTDIR}/include" "${ONNXRUNTIME_ROOTDIR}/include/onnxruntime/core/session")
20+
include_directories("${ONNXRUNTIME_ROOTDIR}/include" "${ONNXRUNTIME_ROOTDIR}/include/onnxruntime/")
2121
link_directories("${ONNXRUNTIME_ROOTDIR}/lib")
2222

2323
if(OPENCV_ROOTDIR)

c_cxx/OpenVINO_EP/Windows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ set OPENCL_INCS=\path\to\openvino\folder\thirdparty\ocl\clhpp_headers\include
3232
```
3333

3434
```
35-
build.bat --config RelWithDebInfo --use_openvino CPU_FP32 --build_shared_lib --parallel --cmake_extra_defines CMAKE_INSTALL_PREFIX=c:\dev\ort_install --skip_tests
35+
build.bat --config RelWithDebInfo --use_openvino CPU --build_shared_lib --parallel --cmake_extra_defines CMAKE_INSTALL_PREFIX=c:\dev\ort_install --skip_tests
3636
```
3737

3838
By default products of the build on Windows go to build\Windows\config folder. In the case above it would be build\Windows\RelWithDebInfo.
@@ -79,7 +79,7 @@ msbuild onnxruntime_samples.sln /p:Configuration=Debug
7979

8080
To run the samples make sure you source openvino variables using setupvars.bat.
8181

82-
To run the samples download and install(extract) OpenCV from: [download OpenCV](https://github.com/opencv/opencv/releases/download/4.7.0/opencv-4.7.0-windows.exe). Also copy OpenCV dll (opencv_world470.dll which is located at: "path\to\opencv\build\x64\vc16\bin") to the location of the application exe file(Release dll for Release build and debug dll for debug build).
82+
To run the samples download and install(extract) OpenCV from: [download OpenCV](https://github.com/opencv/opencv/releases/download/4.7.0/opencv-4.7.0-windows.exe). Also copy OpenCV dll (opencv_world470.dll which is located at: "path\to\opencv\build\x64\vc16\bin") to the location of the application exe file(Release dll for release build) and (opencv_world470d.dll which is located at:"path\to\opencv\build\x64\vc16\bin") to the location of the application exe file (debug dll for debug build).
8383

8484
#### Run the sample
8585

c_cxx/OpenVINO_EP/Windows/model-explorer/model-explorer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main(int argc, char** argv) {
6565
#ifdef USE_OPENVINO
6666
// Using OPENVINO backend
6767
OrtOpenVINOProviderOptions options;
68-
options.device_type = "CPU_FP32"; //Other options are: GPU_FP32, GPU_FP16, MYRIAD_FP16
68+
options.device_type = "CPU";
6969
std::cout << "OpenVINO device type is set to: " << options.device_type << std::endl;
7070
session_options.AppendExecutionProvider_OpenVINO(options);
7171
#endif

c_cxx/OpenVINO_EP/Windows/squeezenet_classification/squeezenet_cpp_app.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int main(int argc, char* argv[])
219219
if (useOPENVINO) {
220220
// Using OPENVINO backend
221221
OrtOpenVINOProviderOptions options;
222-
options.device_type = "CPU_FP32"; //Other options are: GPU_FP32, GPU_FP16, MYRIAD_FP16
222+
options.device_type = "CPU";
223223
std::cout << "OpenVINO device type is set to: " << options.device_type << std::endl;
224224
sessionOptions.AppendExecutionProvider_OpenVINO(options);
225225
}

c_cxx/OpenVINO_EP/Windows/squeezenet_classification_io_buffer/squeezenet_cpp_app_io_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ int main(int argc, char* argv[])
248248
//Appending OpenVINO Execution Provider API
249249
// Using OPENVINO backend
250250
OrtOpenVINOProviderOptions options;
251-
options.device_type = "GPU_FP32"; //Another options are: GPU_FP16, GPU.1_FP32, GPU.1_FP16, GPU.0_FP32, GPU.0_FP16
251+
options.device_type = "GPU";
252252
options.context = (void *) ocl_instance->_context.get() ;
253253
std::cout << "OpenVINO device type is set to: " << options.device_type << std::endl;
254254
sessionOptions.AppendExecutionProvider_OpenVINO(options);

0 commit comments

Comments
 (0)