-
-
Notifications
You must be signed in to change notification settings - Fork 747
new OpenVINO preset #1752
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
saudet
merged 21 commits into
bytedeco:master
from
barrypitman:codex/add-new-openvino-preset-for-windows-and-linux
May 17, 2026
Merged
new OpenVINO preset #1752
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d2ea252
Pin OpenVINO preset to 2025.4.1 build 20426
barrypitman f72dab5
Add OpenVINO sample and upload CI build artifacts
barrypitman fc85fe8
Fix OpenVINO artifact upload to collect jars from ~/.m2
barrypitman 5041470
Preserve Maven snapshots for OpenVINO artifact upload
barrypitman c982e75
Revert OpenVINO artifact-capture workflow changes
barrypitman be6bb12
Refactor OpenVINO installation to use archive extraction instead of p…
barrypitman 3d9ed84
fix build - URL was missing the platform segment.
barrypitman 16f3a71
address comments
barrypitman 2fe85f3
use javacpp maven plugin to configure paths instead of modifying tree…
barrypitman b30e3a5
use --strip-components=1 to simplify paths, and add inherit = OpenCL.…
barrypitman acee8be
fix build by configuring OpenCL
barrypitman 740d07a
fix windows build
barrypitman 345b829
Update OpenVINO preset to 2026.1.0
barrypitman 6a93085
Support macosx-arm64
m1ngyuan 3aaee7f
Merge pull request #4 from m1ngyuan/codex/openvino-support-macosx
barrypitman bef2f6d
Merge pull request #2 from barrypitman/codex/update-openvino-version-…
barrypitman 8817d8a
Address OpenVINO platform review comments
barrypitman 1e445ec
Merge pull request #5 from barrypitman/codex/review-and-address-pr-co…
barrypitman f290612
add missing <module>openvino</module> from parent pom for different …
barrypitman 34e9097
Update CHANGELOG.md, add licensing, and fix nits
saudet 8172977
Merge remote-tracking branch 'upstream/master' into codex/add-new-ope…
saudet 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
Some comments aren't visible on the classic Files Changed page.
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,32 @@ | ||
| name: openvino | ||
| on: | ||
| push: | ||
| paths: | ||
| - openvino/** | ||
| - .github/workflows/openvino.yml | ||
| pull_request: | ||
| paths: | ||
| - openvino/** | ||
| - .github/workflows/openvino.yml | ||
| workflow_dispatch: | ||
| env: | ||
| CI_DEPLOY_MODULE: ${{ github.workflow }} | ||
| CI_DEPLOY_PLATFORM: ${{ github.job }} | ||
| CI_DEPLOY_SETTINGS: ${{ secrets.CI_DEPLOY_SETTINGS }} | ||
| CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | ||
| CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | ||
| STAGING_REPOSITORY: ${{ secrets.STAGING_REPOSITORY }} | ||
| jobs: | ||
| linux-x86_64: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions | ||
| windows-x86_64: | ||
| runs-on: windows-2022 | ||
| steps: | ||
| - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions | ||
| platform: | ||
| needs: [linux-x86_64, windows-x86_64] | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: bytedeco/javacpp-presets/.github/actions/redeploy@actions |
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,17 @@ | ||
| # OpenVINO | ||
|
|
||
| The [OpenVINO](https://github.com/openvinotoolkit/openvino) preset packages the OpenVINO Runtime C API and shared libraries. | ||
|
|
||
| Supported platforms: | ||
| - `linux-x86_64` | ||
| - `windows-x86_64` | ||
|
|
||
| The packaged runtime includes the CPU, GPU, and NPU plugin shared libraries from the official OpenVINO wheel distribution. | ||
|
|
||
| ## Sample | ||
|
|
||
| A minimal sample is available under `openvino/samples/`: | ||
|
|
||
| ```bash | ||
| mvn -f openvino/samples/pom.xml compile exec:java | ||
| ``` |
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,78 @@ | ||
| #!/bin/bash | ||
| # This file is meant to be included by the parent cppbuild.sh script | ||
| if [[ -z "$PLATFORM" ]]; then | ||
| pushd .. | ||
| bash cppbuild.sh "$@" openvino | ||
| popd | ||
| exit | ||
| fi | ||
|
|
||
| OPENVINO_VERSION=2025.4.1 | ||
| OPENVINO_BUILD=20426.82bbf0292c5 | ||
| OPENVINO_PACKAGES_URL=https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION} | ||
|
|
||
| mkdir -p "$PLATFORM" | ||
| cd "$PLATFORM" | ||
| INSTALL_PATH=`pwd` | ||
| mkdir -p include lib bin | ||
|
|
||
| extract_openvino_archive() { | ||
| local archive_platform=$1 | ||
| local archive_name=$2 | ||
| local archive_dir | ||
|
|
||
| find . -maxdepth 1 -type d -name "openvino_toolkit_*" -exec rm -rf {} \; | ||
| download "${OPENVINO_PACKAGES_URL}/${archive_platform}/${archive_name}" "${archive_name}" | ||
|
|
||
| case "$archive_name" in | ||
| *.zip) | ||
| unzip -q -o "$archive_name" | ||
| ;; | ||
| *.tar.gz|*.tgz) | ||
| tar -xzf "$archive_name" | ||
| ;; | ||
| *) | ||
| echo "Error: Unsupported archive \"$archive_name\"" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| archive_dir=$(find . -maxdepth 1 -type d -name "openvino_toolkit_*_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64" | head -n 1) | ||
| if [[ -z "$archive_dir" ]]; then | ||
| echo "Error: OpenVINO archive contents not found in \"$archive_name\"" | ||
| exit 1 | ||
| fi | ||
|
|
||
| cp -a "$archive_dir/runtime/include/." include/ | ||
|
|
||
| case $PLATFORM in | ||
| linux-x86_64) | ||
| cp -a "$archive_dir/runtime/lib/intel64/." lib/ | ||
| ;; | ||
| windows-x86_64) | ||
| cp -a "$archive_dir/runtime/bin/intel64/Release/." bin/ | ||
| cp -a "$archive_dir/runtime/lib/intel64/Release/." lib/ | ||
| ;; | ||
| esac | ||
|
|
||
| rm -rf "$archive_dir" | ||
| } | ||
|
|
||
| case $PLATFORM in | ||
| linux-x86_64) | ||
| extract_openvino_archive linux openvino_toolkit_ubuntu22_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.tgz | ||
| pushd lib | ||
| ln -sf $(ls libopenvino.so.* | head -n 1) libopenvino.so | ||
| ln -sf $(ls libopenvino_c.so.* | head -n 1) libopenvino_c.so | ||
| popd | ||
| ;; | ||
| windows-x86_64) | ||
| extract_openvino_archive windows openvino_toolkit_windows_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.zip | ||
| ;; | ||
| *) | ||
| echo "Error: Platform \"$PLATFORM\" is not supported" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| cd .. | ||
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,110 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>javacpp-presets</artifactId> | ||
| <version>1.5.14-SNAPSHOT</version> | ||
| <relativePath>../../</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>openvino-platform</artifactId> | ||
| <version>2025.4.1-${project.parent.version}</version> | ||
| <name>JavaCPP Presets Platform for OpenVINO</name> | ||
|
|
||
| <properties> | ||
| <javacpp.moduleId>openvino</javacpp.moduleId> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>${javacpp.moduleId}</artifactId> | ||
| <version>${project.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>${javacpp.moduleId}</artifactId> | ||
| <version>${project.version}</version> | ||
| <classifier>${javacpp.platform.linux-x86_64}</classifier> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>${javacpp.moduleId}</artifactId> | ||
| <version>${project.version}</version> | ||
| <classifier>${javacpp.platform.windows-x86_64}</classifier> | ||
| </dependency> | ||
|
barrypitman marked this conversation as resolved.
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <artifactId>maven-jar-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>default-jar</id> | ||
| <configuration> | ||
| <archive> | ||
| <manifestEntries> | ||
| <Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path> | ||
| </manifestEntries> | ||
| </archive> | ||
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>empty-javadoc-jar</id> | ||
| <goals> | ||
| <goal>jar</goal> | ||
| </goals> | ||
| <configuration> | ||
| <classifier>javadoc</classifier> | ||
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>empty-sources-jar</id> | ||
| <goals> | ||
| <goal>jar</goal> | ||
| </goals> | ||
| <configuration> | ||
| <classifier>sources</classifier> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.moditect</groupId> | ||
| <artifactId>moditect-maven-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>add-module-infos</id> | ||
| <phase>none</phase> | ||
| </execution> | ||
| <execution> | ||
| <id>add-platform-module-info</id> | ||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>add-module-info</goal> | ||
| </goals> | ||
| <configuration> | ||
| <modules> | ||
| <module> | ||
| <file>${project.build.directory}/${project.artifactId}.jar</file> | ||
| <moduleInfoSource> | ||
| module org.bytedeco.${javacpp.moduleId}.platform { | ||
| requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64; | ||
| requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64; | ||
| } | ||
| </moduleInfoSource> | ||
| </module> | ||
| </modules> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
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,68 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>javacpp-presets</artifactId> | ||
| <version>1.5.14-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>openvino</artifactId> | ||
| <version>2025.4.1-${project.parent.version}</version> | ||
|
barrypitman marked this conversation as resolved.
Outdated
|
||
| <name>JavaCPP Presets for OpenVINO</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>javacpp</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <artifactId>maven-resources-plugin</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>javacpp</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-jar-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>javacpp-${javacpp.platform}${javacpp.platform.extension}</id> | ||
| <phase>package</phase> | ||
| <configuration> | ||
| <excludes> | ||
| <exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.exp</exclude> | ||
| <exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.lib</exclude> | ||
| <exclude>org/bytedeco/openvino/${javacpp.platform}${javacpp.platform.extension}/*.obj</exclude> | ||
| </excludes> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.moditect</groupId> | ||
| <artifactId>moditect-maven-plugin</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-dependency-plugin</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-source-plugin</artifactId> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-javadoc-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
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,14 @@ | ||
| import org.bytedeco.javacpp.Loader; | ||
| import org.bytedeco.openvino.ov_core_t; | ||
|
|
||
| public class OpenVINOInfo { | ||
| public static void main(String[] args) { | ||
| String jniLibraryPath = Loader.load(org.bytedeco.openvino.global.openvino.class); | ||
| System.out.println("OpenVINO JavaCPP JNI library loaded from: " + jniLibraryPath); | ||
|
|
||
| ov_core_t core = new ov_core_t(); | ||
| System.out.println("Allocated ov_core_t wrapper successfully: " + core); | ||
|
|
||
| System.out.println("OpenVINO preset load verification complete."); | ||
| } | ||
| } |
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,30 @@ | ||
| <project> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>org.bytedeco.openvino</groupId> | ||
| <artifactId>openvino-sample</artifactId> | ||
| <version>1.5.14-SNAPSHOT</version> | ||
|
|
||
| <properties> | ||
| <exec.mainClass>OpenVINOInfo</exec.mainClass> | ||
| <maven.compiler.target>1.8</maven.compiler.target> | ||
| <maven.compiler.source>1.8</maven.compiler.source> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>openvino</artifactId> | ||
| <version>2025.4.1-1.5.14-SNAPSHOT</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.bytedeco</groupId> | ||
| <artifactId>openvino</artifactId> | ||
| <version>2025.4.1-1.5.14-SNAPSHOT</version> | ||
| <classifier>linux-x86_64</classifier> | ||
| </dependency> | ||
|
barrypitman marked this conversation as resolved.
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
| <sourceDirectory>.</sourceDirectory> | ||
| </build> | ||
| </project> | ||
35 changes: 35 additions & 0 deletions
35
openvino/src/gen/java/org/bytedeco/openvino/encryption_func.java
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,35 @@ | ||
| // Targeted by JavaCPP version 1.5.14-SNAPSHOT: DO NOT EDIT THIS FILE | ||
|
|
||
| package org.bytedeco.openvino; | ||
|
|
||
| import java.nio.*; | ||
| import org.bytedeco.javacpp.*; | ||
| import org.bytedeco.javacpp.annotation.*; | ||
|
|
||
| import static org.bytedeco.javacpp.presets.javacpp.*; | ||
|
|
||
| import static org.bytedeco.openvino.global.openvino.*; | ||
|
|
||
|
|
||
| /** | ||
| * \brief encryption_func is a function pointer that encrypt or decrypt the input memory, example of this function is | ||
| * codec(const char* input, const size_t in_size, const char* output, size_t* out_size) | ||
| * This function needs to be called twice, | ||
| * the first call to obtain out_size (the size of output buffer), the second call to obtain output buffer. | ||
| * The first call output is nullptr, before the second call, the caller needs to apply for output | ||
| * memory based on the out_size returned by the first call. | ||
| * the memory of parameter output is allocated and released by the caller. | ||
| * @param input The pointer to the input buffer. | ||
| * @param in_size The size of input. | ||
| * @param output The pointer to the encrypted/decrypted buffer. | ||
| * @param out_size The size of output. | ||
| */ | ||
| @Properties(inherit = org.bytedeco.openvino.presets.openvino.class) | ||
| public class encryption_func extends FunctionPointer { | ||
| static { Loader.load(); } | ||
| /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ | ||
| public encryption_func(Pointer p) { super(p); } | ||
| protected encryption_func() { allocate(); } | ||
| private native void allocate(); | ||
| public native void call(@Cast("const char*") BytePointer arg0, @Cast("const size_t") long arg1, @Cast("char*") BytePointer arg2, @Cast("size_t*") SizeTPointer arg3); | ||
| } |
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.