Skip to content

Commit

Permalink
upgrade to ov 2024.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Mar 8, 2024
1 parent d414e90 commit 047ac1c
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 101 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/linux-ov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: steps.cache-protobuf.outputs.cache-hit != 'true'
with:
repository: protocolbuffers/protobuf
# follows protobuf in https://github.com/openvinotoolkit/openvino/tree/2023.2.0/thirdparty/protobuf
# follows protobuf in https://github.com/openvinotoolkit/openvino/tree/2024.0.0/thirdparty/protobuf
# if you change this, remember to bump the version of the cache key.
ref: fe271ab76f2ad2b2b28c10443865d2af21e27e0e
fetch-depth: 1
Expand Down Expand Up @@ -69,9 +69,9 @@ jobs:
uses: actions/checkout@v4
with:
repository: onnx/onnx
# follows onnx in https://github.com/openvinotoolkit/openvino/tree/2023.2.0/thirdparty/onnx
# follows onnx in https://github.com/openvinotoolkit/openvino/tree/2024.0.0/thirdparty/onnx
# if you change this, remember to bump the version of the cache key.
ref: 1014f41f17ecc778d63e760a994579d96ba471ff
ref: b86cc54efce19530fb953e4b21f57e6b3888534c
fetch-depth: 1
path: vsov/onnx

Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Setup OpenVINO
run: |
curl -L -o ov.tgz https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.2/linux/l_openvino_toolkit_ubuntu22_2023.2.0.13089.cfd42bd2cb0_x86_64.tgz
curl -L -o ov.tgz https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64.tgz
tar -xf ov.tgz
mv l_openvino_* openvino -v
Expand All @@ -112,7 +112,6 @@ jobs:
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_CXX_FLAGS="-Wall -ffast-math -march=x86-64-v3"
-D VAPOURSYNTH_INCLUDE_DIRECTORY="`pwd`/vapoursynth/include"
-D InferenceEngine_DIR=openvino/runtime/cmake
-D OpenVINO_DIR=openvino/runtime/cmake
-D ENABLE_VISUALIZATION=ON
-D WIN32_SHARED_OPENVINO=ON
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/windows-ov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ jobs:
uses: actions/cache@v4
with:
path: vsov/protobuf/install
key: ${{ runner.os }}-vsov-protobuf-v1
key: ${{ runner.os }}-vsov-protobuf-v2

- name: Checkout protobuf
uses: actions/checkout@v4
if: steps.cache-protobuf.outputs.cache-hit != 'true'
with:
repository: protocolbuffers/protobuf
# follows protobuf in https://github.com/AmusementClub/openvino/tree/master/thirdparty/protobuf
# follows protobuf in https://github.com/openvinotoolkit/openvino/tree/2024.0.0/thirdparty/protobuf
# if you change this, remember to bump the version of the cache key.
ref: 6c6b0778b70f35f93c2f0dee30e5d12ad2a83eea
ref: fe271ab76f2ad2b2b28c10443865d2af21e27e0e
fetch-depth: 1
path: vsov/protobuf

Expand All @@ -86,16 +86,16 @@ jobs:
uses: actions/cache@v4
with:
path: vsov/onnx/install
key: ${{ runner.os }}-vsov-onnx-v2
key: ${{ runner.os }}-vsov-onnx-v3

- name: Checkout onnx
if: steps.cache-onnx.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: onnx/onnx
# follows onnx in https://github.com/AmusementClub/openvino/tree/master/thirdparty/onnx
# follows onnx in https://github.com/openvinotoolkit/openvino/tree/2024.0.0/thirdparty/onnx
# if you change this, remember to bump the version of the cache key.
ref: f7ee1ac60d06abe8e26c9b6bbe1e3db5286b614b
ref: b86cc54efce19530fb953e4b21f57e6b3888534c
fetch-depth: 1
path: vsov/onnx

Expand Down Expand Up @@ -124,23 +124,16 @@ jobs:
unzip -q vs.zip
mv vapoursynth-*/ vapoursynth/
- name: Download OpenVINO Runtime Precompilation
shell: bash
- name: Setup OpenVINO
run: |
rev="${{github.event.inputs.ov_tag || inputs.ov_tag || 'latest'}}"
if [ "$rev" == "latest" ]; then
url="https://github.com/AmusementClub/openvino/releases/latest/download/openvino-gpu-win64.zip"
else
url="https://github.com/AmusementClub/openvino/releases/download/$rev/openvino-gpu-win64.zip"
fi
curl -s -o openvino.zip -LJO "$url"
unzip -q openvino.zip
curl -L -o ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/windows/w_openvino_toolkit_windows_2024.0.0.14509.34caeefd078_x86_64.zip
unzip ov.zip
rename w_openvino_toolkit_windows_2024.0.0.14509.34caeefd078_x86_64 openvino
- name: Configure
run: cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
-D InferenceEngine_DIR=openvino/runtime/cmake
-D OpenVINO_DIR=openvino/runtime/cmake
-D VAPOURSYNTH_INCLUDE_DIRECTORY="%cd%\vapoursynth\include"
-D ENABLE_VISUALIZATION=ON
Expand All @@ -156,7 +149,7 @@ jobs:
cmake --install build --prefix install
mkdir artifact
mkdir artifact\vsov
copy openvino\runtime\3rdparty\tbb\bin\tbb.dll artifact\vsov\
copy openvino\runtime\3rdparty\tbb\bin\tbb12.dll artifact\vsov\
copy install\bin\vsov.dll artifact\
xcopy openvino\runtime\bin\intel64\Release\* artifact\vsov\ /s
Expand Down
18 changes: 9 additions & 9 deletions vsov/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set(ENABLE_VISUALIZATION OFF CACHE BOOL "Enable support for network visualizatio
set(WIN32_SHARED_OPENVINO OFF CACHE BOOL "Build for win32 with shared openvino library")

find_package(OpenVINO REQUIRED CONFIG)
find_package(InferenceEngine REQUIRED CONFIG)

add_library(vsov SHARED
vs_openvino.cpp
Expand All @@ -24,20 +23,21 @@ if(WIN32_SHARED_OPENVINO)
target_compile_definitions(vsov PRIVATE WIN32_SHARED_OPENVINO)
endif()

target_include_directories(vsov PRIVATE
${VAPOURSYNTH_INCLUDE_DIRECTORY}
${ONNX_INCLUDE_DIRS}
${InferenceEngine_INCLUDE_DIRS}
)

if(WIN32_SHARED_OPENVINO)
find_package(protobuf REQUIRED CONFIG)
find_package(ONNX REQUIRED CONFIG)
target_link_libraries(vsov PRIVATE ${InferenceEngine_LIBRARIES} onnx)
target_link_libraries(vsov PRIVATE onnx)
else()
target_link_libraries(vsov PRIVATE ${InferenceEngine_LIBRARIES} openvino::onnx)
target_link_libraries(vsov PRIVATE openvino::frontend::onnx)
endif()

target_include_directories(vsov PRIVATE
${VAPOURSYNTH_INCLUDE_DIRECTORY}
${ONNX_INCLUDE_DIRS}
)

target_link_libraries(vsov PRIVATE openvino::runtime)

set_target_properties(vsov PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
Expand Down
Loading

0 comments on commit 047ac1c

Please sign in to comment.