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: d9a068b8b71c
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: de171ba0c687
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 5, 2019

  1. cntk: partially unbreak

    * Use GCC 7 to unbreak the build;
    * Mark CUDA build as broken due to cub incompatibility.
    abbradar committed Oct 5, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    de171ba View commit details
Showing with 18 additions and 3 deletions.
  1. +16 −3 pkgs/applications/science/math/cntk/default.nix
  2. +2 −0 pkgs/top-level/all-packages.nix
19 changes: 16 additions & 3 deletions pkgs/applications/science/math/cntk/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, lib, stdenv, fetchgit, fetchFromGitHub, cmake
{ lib, stdenv, fetchgit, fetchFromGitHub, cmake
, openblas, opencv3, libzip, boost, protobuf, openmpi
, onebitSGDSupport ? false
, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11
, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11
, cudnnSupport ? cudaSupport, cudnn
}:

@@ -27,7 +27,10 @@ in stdenv.mkDerivation rec {
sha256 = "18l9k7s966a26ywcf7flqyhm61788pcb9fj3wk61jrmgkhy2pcns";
};

nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake ] ++ lib.optional cudaSupport addOpenGLRunpath;

# Force OpenMPI to use g++ in PATH.
OMPI_CXX = "g++";

buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ]
++ lib.optional cudaSupport cudatoolkit
@@ -69,6 +72,7 @@ in stdenv.mkDerivation rec {
ln -s ${cudnn}/include cuda
export configureFlags="$configureFlags --with-cudnn=$PWD"
''}
../configure $configureFlags
'';

@@ -79,9 +83,18 @@ in stdenv.mkDerivation rec {
cp bin/cntk $out/bin
'';

postFixup = lib.optionalString cudaSupport ''
for lib in $out/lib/*; do
addOpenGLRunpath "$lib"
done
'';

enableParallelBuilding = true;

meta = with lib; {
# Newer cub is included with cudatoolkit now and it breaks the build.
# https://github.com/Microsoft/CNTK/issues/3191
broken = cudaSupport;
homepage = https://github.com/Microsoft/CNTK;
description = "An open source deep-learning toolkit";
license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -23554,8 +23554,10 @@ in
caffeine-ng = callPackage ../tools/X11/caffeine-ng {};

cntk = callPackage ../applications/science/math/cntk {
stdenv = gcc7Stdenv;
inherit (linuxPackages) nvidia_x11;
opencv3 = opencv3WithoutCuda; # Used only for image loading.
cudaSupport = pkgs.config.cudaSupport or false;
};

ecm = callPackage ../applications/science/math/ecm { };