Skip to content

openvino: Enable CPU plugin on other architectures #428463

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smaeul
Copy link

@smaeul smaeul commented Jul 25, 2025

The "Intel CPU" plugin name is a bit misleading, as the same plugin is required to run models on the CPU on other architectures. On AArch64 the plugin uses the ARM Compute Library, which needs a small patch to fix building with LTO enabled in the OpenVino build system.

Closes: #388048

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

The "Intel CPU" plugin name is a bit misleading, as the same plugin is
required to run models on the CPU on other architectures. On AArch64 the
plugin uses the ARM Compute Library, which needs a small patch to fix
building with LTO enabled in the OpenVino build system.

Closes: NixOS#388048
@nixpkgs-ci nixpkgs-ci bot added 12.first-time contribution This PR is the author's first one; please be gentle! 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jul 25, 2025
@nix-owners nix-owners bot requested a review from tfmoraes July 25, 2025 22:40
Comment on lines +97 to +98
--replace-fail 'toolchain_prefix + "ar"' '"${stdenv.cc.cc}/bin/gcc-ar"' \
--replace-fail 'toolchain_prefix + "ranlib"' '"${stdenv.cc.cc}/bin/gcc-ranlib"'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will definitely not work with clang 😅 Can we use the generic ar and ranlib instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the GNU toolchain does not install the LTO plugin, so using the prefixed tools is required to understand LTO objects and generate a working static library. See also for example #188544 #384599. A git grep -w gcc-ar shows several packages doing the same thing. I suppose the right thing to do is gate the patch behind stdenv.cc.isGNU? (LLVM+binutils would need to use llvm-ar if that is a supported combination.)

Copy link
Contributor

@izelnakri izelnakri Aug 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaeul does this have any consequences for the x86 environments? Seems like this should be rather a fix that needs to happen on openvino repository side. Is there an Issue thread? Let me know if I'm wrong, thats been my first thoughts ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

openvino: CPU plugin missing on ARM
3 participants