-
Notifications
You must be signed in to change notification settings - Fork 9
Fix vxMinMaxLocNode minCount/maxCount scalar type to VX_TYPE_SIZE (#29) #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
27ff70c
Fix vxMinMaxLocNode minCount/maxCount scalar type to VX_TYPE_SIZE (#29)
kiritigowda 2246ed9
Add GitHub Actions conformance workflow using the sample implementation
kiritigowda a70a40f
CI: run full conformance suites without excluding any tests
kiritigowda 7ab68e4
docs: document Git LFS as a prerequisite for cloning (#38)
kiritigowda d513289
Address Copilot review: fetch LFS in CI and use %zu for counts
kiritigowda c550b2c
Fix MatchTemplate MinMaxLoc count scalars to VX_TYPE_SIZE (#29)
kiritigowda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,284 @@ | ||
| name: Conformance | ||
|
|
||
| # Builds the Khronos OpenVX sample implementation and runs this CTS checkout | ||
| # against it, mirroring the modes from the internal GitLab pipeline | ||
| # (.gitlab-ci.yml) but adapted for GitHub Actions and the public | ||
| # KhronosGroup/OpenVX-sample-impl repository. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - openvx_1.3.2 | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| SAMPLE_IMPL_REPO: https://github.com/KhronosGroup/OpenVX-sample-impl.git | ||
| SAMPLE_IMPL_REF: openvx_1.3.2 | ||
|
|
||
| jobs: | ||
| # Stage 1 -- sanity build: confirm this CTS checkout compiles against a | ||
| # default-feature build of the sample implementation. Gates the test matrix. | ||
| build: | ||
| name: Build · CTS + sample impl | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout CTS | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ | ||
| cmake make git python3 gcc g++ | ||
| gcc --version | ||
|
|
||
| - name: Configure paths | ||
| run: | | ||
| echo "SAMPLE_IMPL_DIR=$RUNNER_TEMP/sample-impl" >> "$GITHUB_ENV" | ||
| echo "OPENVX_DIR=$RUNNER_TEMP/sample-impl/install/Linux/x64/Debug" >> "$GITHUB_ENV" | ||
| echo "VX_TEST_DATA_PATH=$GITHUB_WORKSPACE/test_data/" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Clone sample implementation | ||
| run: | | ||
| rm -rf "$SAMPLE_IMPL_DIR" | ||
| git clone --recursive --branch "$SAMPLE_IMPL_REF" \ | ||
| "$SAMPLE_IMPL_REPO" "$SAMPLE_IMPL_DIR" | ||
|
|
||
| - name: Build sample implementation | ||
| run: | | ||
| mkdir -p "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cd "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cmake "$SAMPLE_IMPL_DIR" \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_INSTALL_PREFIX="$OPENVX_DIR" \ | ||
| -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \ | ||
| -DBUILD_X64=1 | ||
| make install -j"$(nproc)" | ||
|
|
||
| - name: Build CTS | ||
| run: | | ||
| rm -rf "$RUNNER_TEMP/build-cts" | ||
| mkdir -p "$RUNNER_TEMP/build-cts" | ||
| cd "$RUNNER_TEMP/build-cts" | ||
| cmake \ | ||
| -DOPENVX_INCLUDES="$OPENVX_DIR/include" \ | ||
| -DOPENVX_LIBRARIES="$OPENVX_DIR/bin/libopenvx.so;$OPENVX_DIR/bin/libvxu.so;pthread;dl;m;rt" \ | ||
| "$GITHUB_WORKSPACE" | ||
| cmake --build . -j"$(nproc)" | ||
|
|
||
| # Stage 2 -- conformance test matrix. Each mode rebuilds the sample impl with | ||
| # its feature flags (features are compiled into libopenvx.so) and runs the | ||
| # matching slice of the suite, mirroring GitLab modes 1-3, 5-7. | ||
| conformance: | ||
| name: Conformance · ${{ matrix.name }} | ||
| needs: build | ||
| runs-on: ubuntu-22.04 | ||
| continue-on-error: ${{ matrix.experimental || false }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # Mode 1 -- Vision | ||
| - name: Vision | ||
| impl_flags: "-DOPENVX_CONFORMANCE_VISION=ON" | ||
| cts_flags: "-DOPENVX_CONFORMANCE_VISION=ON" | ||
| filter: "" | ||
| # Mode 2 -- Vision + Enhanced Vision | ||
| - name: Vision + Enhanced Vision | ||
| impl_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON" | ||
| cts_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON" | ||
| filter: "" | ||
| # Mode 3 -- Neural Networks (full suite; AlexNet weights + input | ||
| # images ship in test_conformance/Networks/Binaries and test_data/images). | ||
| - name: Neural Networks | ||
| impl_flags: "-DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON" | ||
| cts_flags: "-DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON" | ||
| filter: "" | ||
| # Mode 5 -- Combined (Vision, Enhanced, NN, NN16, Import/Export, U1) | ||
| - name: Combined | ||
| impl_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON -DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON -DOPENVX_USE_NN=ON -DOPENVX_USE_IX=ON -DOPENVX_USE_U1=ON" | ||
| cts_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON -DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON -DOPENVX_USE_NN=ON -DOPENVX_USE_IX=ON -DOPENVX_USE_U1=ON" | ||
| filter: "" | ||
| # Mode 6 -- User Data Object | ||
| - name: User Data Object | ||
| impl_flags: "-DOPENVX_USE_USER_DATA_OBJECT=ON" | ||
| cts_flags: "-DOPENVX_USE_USER_DATA_OBJECT=ON" | ||
| filter: "" | ||
| # Mode 7 -- Pipelining (run only the pipeline suite) | ||
| - name: Pipelining | ||
| impl_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON -DOPENVX_USE_PIPELINING=ON" | ||
| cts_flags: "-DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON -DOPENVX_USE_PIPELINING=ON" | ||
| filter: "--filter=GraphPipeline.*" | ||
| steps: | ||
| - name: Checkout CTS | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ | ||
| cmake make git python3 gcc g++ | ||
|
|
||
| - name: Configure paths | ||
| run: | | ||
| echo "SAMPLE_IMPL_DIR=$RUNNER_TEMP/sample-impl" >> "$GITHUB_ENV" | ||
| echo "OPENVX_DIR=$RUNNER_TEMP/sample-impl/install/Linux/x64/Debug" >> "$GITHUB_ENV" | ||
| echo "VX_TEST_DATA_PATH=$GITHUB_WORKSPACE/test_data/" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Clone sample implementation | ||
| run: | | ||
| rm -rf "$SAMPLE_IMPL_DIR" | ||
| git clone --recursive --branch "$SAMPLE_IMPL_REF" \ | ||
| "$SAMPLE_IMPL_REPO" "$SAMPLE_IMPL_DIR" | ||
|
|
||
| - name: Build sample implementation | ||
| run: | | ||
| mkdir -p "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cd "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cmake "$SAMPLE_IMPL_DIR" \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_INSTALL_PREFIX="$OPENVX_DIR" \ | ||
| -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \ | ||
| -DBUILD_X64=1 ${{ matrix.impl_flags }} | ||
| make install -j"$(nproc)" | ||
|
|
||
| - name: Build CTS | ||
| run: | | ||
| rm -rf "$RUNNER_TEMP/build-cts" | ||
| mkdir -p "$RUNNER_TEMP/build-cts" | ||
| cd "$RUNNER_TEMP/build-cts" | ||
| cmake \ | ||
| -DOPENVX_INCLUDES="$OPENVX_DIR/include" \ | ||
| -DOPENVX_LIBRARIES="$OPENVX_DIR/bin/libopenvx.so;$OPENVX_DIR/bin/libvxu.so;pthread;dl;m;rt" \ | ||
| ${{ matrix.cts_flags }} "$GITHUB_WORKSPACE" | ||
| cmake --build . -j"$(nproc)" | ||
|
|
||
| - name: Run conformance | ||
| run: | | ||
| cd "$RUNNER_TEMP/build-cts" | ||
| LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \ | ||
| ./bin/vx_test_conformance ${{ matrix.filter }} | ||
|
|
||
| # Mode 4 -- NNEF Import. Needs extra include path + links libnnef-lib.a and | ||
| # stdc++. The sample impl's NNEF submodule uses std::numeric_limits without | ||
| # including <limits>, so force-include it on the impl build. | ||
| nnef-import: | ||
| name: Conformance · NNEF Import | ||
| needs: build | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout CTS | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ | ||
| cmake make git python3 gcc g++ | ||
|
|
||
| - name: Configure paths | ||
| run: | | ||
| echo "SAMPLE_IMPL_DIR=$RUNNER_TEMP/sample-impl" >> "$GITHUB_ENV" | ||
| echo "OPENVX_DIR=$RUNNER_TEMP/sample-impl/install/Linux/x64/Debug" >> "$GITHUB_ENV" | ||
| echo "VX_TEST_DATA_PATH=$GITHUB_WORKSPACE/test_data/" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Clone sample implementation | ||
| run: | | ||
| rm -rf "$SAMPLE_IMPL_DIR" | ||
| git clone --recursive --branch "$SAMPLE_IMPL_REF" \ | ||
| "$SAMPLE_IMPL_REPO" "$SAMPLE_IMPL_DIR" | ||
|
|
||
| - name: Build sample implementation (NNEF) | ||
| run: | | ||
| mkdir -p "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cd "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cmake "$SAMPLE_IMPL_DIR" \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_INSTALL_PREFIX="$OPENVX_DIR" \ | ||
| -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \ | ||
| -DBUILD_X64=1 \ | ||
| -DOPENVX_CONFORMANCE_NNEF_IMPORT=ON \ | ||
| -DCMAKE_CXX_FLAGS="-include limits" | ||
| make install -j"$(nproc)" | ||
|
|
||
| - name: Build and run CTS (NNEF) | ||
| run: | | ||
| rm -rf "$RUNNER_TEMP/build-cts" | ||
| mkdir -p "$RUNNER_TEMP/build-cts" | ||
| cd "$RUNNER_TEMP/build-cts" | ||
| cmake \ | ||
| -DOPENVX_INCLUDES="$OPENVX_DIR/include" \ | ||
| -DOPENVX_LIBRARIES="$OPENVX_DIR/bin/libopenvx.so;$OPENVX_DIR/bin/libvxu.so;$OPENVX_DIR/bin/libnnef-lib.a;pthread;dl;m;rt;stdc++" \ | ||
| -DOPENVX_CONFORMANCE_NNEF_IMPORT=ON \ | ||
| -DCMAKE_C_FLAGS="-I$SAMPLE_IMPL_DIR/kernels/NNEF-Tools/parser/cpp/include" \ | ||
| "$GITHUB_WORKSPACE" | ||
| cmake --build . -j"$(nproc)" | ||
| LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" ./bin/vx_test_conformance | ||
|
|
||
| # Mode 8 -- Streaming. The streaming + event-queue APIs are stubs in the | ||
| # sample implementation, so this job is allowed to fail and surfaces only as | ||
| # a warning (mirrors GitLab `allow_failure: true`). | ||
| streaming: | ||
| name: Conformance · Streaming (warn-only) | ||
| needs: build | ||
| runs-on: ubuntu-22.04 | ||
| continue-on-error: true | ||
| steps: | ||
| - name: Checkout CTS | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ | ||
| cmake make git python3 gcc g++ | ||
|
|
||
| - name: Configure paths | ||
| run: | | ||
| echo "SAMPLE_IMPL_DIR=$RUNNER_TEMP/sample-impl" >> "$GITHUB_ENV" | ||
| echo "OPENVX_DIR=$RUNNER_TEMP/sample-impl/install/Linux/x64/Debug" >> "$GITHUB_ENV" | ||
| echo "VX_TEST_DATA_PATH=$GITHUB_WORKSPACE/test_data/" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Clone sample implementation | ||
| run: | | ||
| rm -rf "$SAMPLE_IMPL_DIR" | ||
| git clone --recursive --branch "$SAMPLE_IMPL_REF" \ | ||
| "$SAMPLE_IMPL_REPO" "$SAMPLE_IMPL_DIR" | ||
|
|
||
| - name: Build sample implementation (Streaming) | ||
| run: | | ||
| mkdir -p "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cd "$SAMPLE_IMPL_DIR/build/Linux/x64/Debug" | ||
| cmake "$SAMPLE_IMPL_DIR" \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_INSTALL_PREFIX="$OPENVX_DIR" \ | ||
| -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \ | ||
| -DBUILD_X64=1 \ | ||
| -DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON \ | ||
| -DOPENVX_USE_PIPELINING=ON -DOPENVX_USE_STREAMING=ON | ||
| make install -j"$(nproc)" | ||
|
|
||
| - name: Build and run CTS (Streaming) | ||
| run: | | ||
| rm -rf "$RUNNER_TEMP/build-cts" | ||
| mkdir -p "$RUNNER_TEMP/build-cts" | ||
| cd "$RUNNER_TEMP/build-cts" | ||
| cmake \ | ||
| -DOPENVX_INCLUDES="$OPENVX_DIR/include" \ | ||
| -DOPENVX_LIBRARIES="$OPENVX_DIR/bin/libopenvx.so;$OPENVX_DIR/bin/libvxu.so;pthread;dl;m;rt" \ | ||
| -DOPENVX_CONFORMANCE_VISION=ON -DOPENVX_USE_ENHANCED_VISION=ON \ | ||
| -DOPENVX_USE_PIPELINING=ON -DOPENVX_USE_STREAMING=ON \ | ||
| "$GITHUB_WORKSPACE" | ||
| cmake --build . -j"$(nproc)" | ||
| if ! LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" ./bin/vx_test_conformance '--filter=GraphStreaming.*'; then | ||
| echo "::warning title=Streaming conformance::Streaming/event-queue APIs are stubbed in the sample implementation; failures are expected." | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.