3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #172684 from SomeoneSerge/xgboost

xgboost: disable checks that require GPU
This commit is contained in:
Sandro 2022-05-12 14:41:04 +02:00 committed by GitHub
commit ad874c4237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -25,7 +25,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-h7zcHCOxe1h7HRB6idtjf4HUBEoHC4V2pqbN9hpe00g=";
};
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin llvmPackages.openmp;
nativeBuildInputs = [
cmake
] ++ lib.optionals stdenv.isDarwin [
llvmPackages.openmp
] ++ lib.optionals cudaSupport [
cudaPackages.autoAddOpenGLRunpathHook
];
buildInputs = [ gtest ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit
++ lib.optional ncclSupport cudaPackages.nccl;
@ -37,6 +43,12 @@ stdenv.mkDerivation rec {
inherit doCheck;
# By default, cmake build will run ctests with all checks enabled
# If we're building with cuda, we run ctest manually so that we can skip the GPU tests
checkPhase = lib.optionalString cudaSupport ''
ctest --force-new-ctest-process ${lib.optionalString cudaSupport "-E TestXGBoostLib"}
'';
installPhase = let
libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}";
in ''

View file

@ -21167,6 +21167,8 @@ with pkgs;
xgboost = callPackage ../development/libraries/xgboost { };
xgboostWithCuda = xgboost.override { cudaSupport = true; };
xgeometry-select = callPackage ../tools/X11/xgeometry-select { };
# Avoid using this. It isn't really a wrapper anymore, but we keep the name.