Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 81e65ca31bd3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9c673c4a9114
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 2, 2019

  1. onnxruntime: init at 0.5.0

    Jonathan Ringer committed Oct 2, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jonringer Jonathan Ringer
    Copy the full SHA
    e38f32a View commit details
  2. Merge pull request #67542 from jonringer/add-onnxruntime

    onnxruntime: init at 0.5.0
    marsam authored Oct 2, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9c673c4 View commit details
Showing with 64 additions and 0 deletions.
  1. +62 −0 pkgs/development/libraries/onnxruntime/default.nix
  2. +2 −0 pkgs/top-level/all-packages.nix
62 changes: 62 additions & 0 deletions pkgs/development/libraries/onnxruntime/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{ stdenv, fetchFromGitHub, glibcLocales
, cmake, python3
}:

stdenv.mkDerivation rec {
pname = "onnxruntime";
version = "0.5.0";

src = fetchFromGitHub {
owner = "microsoft";
repo = "onnxruntime";
rev = "v${version}";
sha256 = "0s8ylc5xr55490hbz7zn3hnp9dnyp92d320ln8xw5hqkw3mgyr3p";
# TODO: use nix-versions of grpc, onnx, eigen, googletest, etc.
# submodules increase src size and compile times significantly
# not currently feasible due to how integrated cmake build is with git
fetchSubmodules = true;
};

# TODO: build server, and move .so's to lib output
outputs = [ "out" "dev" ];

nativeBuildInputs = [
cmake
python3 # for shared-lib or server
];

cmakeDir = "../cmake";

cmakeFlags = [
"-Donnxruntime_USE_OPENMP=ON"
"-Donnxruntime_BUILD_SHARED_LIB=ON"
"-Donnxruntime_ENABLE_LTO=ON"
];

# ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8"
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
'';
doCheck = true;

postInstall = ''
rm -r $out/bin # ctest runner
'';

meta = with stdenv.lib; {
description = "Cross-platform, high performance scoring engine for ML models";
longDescription = ''
ONNX Runtime is a performance-focused complete scoring engine
for Open Neural Network Exchange (ONNX) models, with an open
extensible architecture to continually address the latest developments
in AI and Deep Learning. ONNX Runtime stays up to date with the ONNX
standard with complete implementation of all ONNX operators, and
supports all ONNX releases (1.2+) with both future and backwards
compatibility.
'';
homepage = "https://github.com/microsoft/onnxruntime";
license = licenses.mit;
maintainers = with maintainers; [ jonringer ];
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -1877,6 +1877,8 @@ in

onboard = callPackage ../applications/misc/onboard { };

onnxruntime = callPackage ../development/libraries/onnxruntime { };

xkbd = callPackage ../applications/misc/xkbd { };

optar = callPackage ../tools/graphics/optar {};