Skip to content
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

mxnet: fix error when building with cudaSupport #48781

Merged
merged 1 commit into from Apr 12, 2019

Conversation

Projects
None yet
3 participants
@juliendehos
Copy link
Contributor

commented Oct 21, 2018

Motivation for this change

Mxnet doesn't build with cudaSupport:

$ nix run "(with import <nixpkgs> { config = { allowUnfree=true; cudaSupport=true; cudnnSupport=true; }; };
python3.withPackages (ps: [ ps.mxnet ]))"

builder for '/nix/store/f5zwrjv4ad0y8p2qk6472d4ryx7nvzm8-mxnet-1.2.1.drv' failed with exit code 1; last 10 log lines:
  CMake Error: CMAKE_CUDA_COMPILER not set, after EnableLanguage
  CMake Error at cmake/FirstClassLangCuda.cmake:79 (try_run):
    Failed to configure test project build system.
  Call Stack (most recent call first):
    cmake/FirstClassLangCuda.cmake:147 (mshadow_detect_installed_gpus)
    CMakeLists.txt:534 (mshadow_select_nvcc_arch_flags)
  
  -- Configuring incomplete, errors occurred!
  See also "/build/apache-mxnet-src-1.2.1-incubating/build/CMakeFiles/CMakeOutput.log".
cannot build derivation '/nix/store/cqkmsv1kldxahdl6klzgn42p6s0vwwq3-python3.6-mxnet-1.2.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xxha232lplcg7zzgv52lmd8qh43bpwqn-python3-3.6.6-env.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/xxha232lplcg7zzgv52lmd8qh43bpwqn-python3-3.6.6-env.drv' failed
Things done

Set the cmake flag OLDCMAKECUDA=ON, as suggested in apache/incubator-mxnet#10743.
Tested on nixos-unstable.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@joachifm joachifm merged commit a13f5d0 into NixOS:master Apr 12, 2019

9 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.