Merge pull request #172684 from SomeoneSerge/xgboost
xgboost: disable checks that require GPU
This commit is contained in:
commit
ad874c4237
|
@ -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 ''
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue