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

juliendehos
Copy link
Contributor

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/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
@juliendehos juliendehos deleted the mxnet-cuda branch February 17, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants