katago: 1.6.1 -> 1.8.0
This commit is contained in:
parent
21a47c4ef3
commit
bca9aa192a
@ -1,43 +1,32 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, gcc8Stdenv
|
, gcc8Stdenv
|
||||||
, lib
|
|
||||||
, libzip
|
|
||||||
, boost
|
, boost
|
||||||
, cmake
|
, cmake
|
||||||
, makeWrapper
|
, cudatoolkit
|
||||||
|
, cudnn
|
||||||
|
, eigen
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, cudnn ? null
|
, gperftools
|
||||||
, cudatoolkit ? null
|
, lib
|
||||||
, mesa ? null
|
, libzip
|
||||||
, opencl-headers ? null
|
, makeWrapper
|
||||||
, ocl-icd ? null
|
, mesa
|
||||||
, gperftools ? null
|
, ocl-icd
|
||||||
, eigen ? null
|
, opencl-headers
|
||||||
|
, openssl
|
||||||
|
, writeShellScriptBin
|
||||||
, enableAVX2 ? stdenv.hostPlatform.avx2Support
|
, enableAVX2 ? stdenv.hostPlatform.avx2Support
|
||||||
, enableBigBoards ? false
|
, enableBigBoards ? false
|
||||||
, enableCuda ? false
|
, enableCuda ? false
|
||||||
|
, enableContrib ? false
|
||||||
, enableGPU ? true
|
, enableGPU ? true
|
||||||
, enableTcmalloc ? true
|
, enableTcmalloc ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableGPU -> (
|
assert !enableGPU -> (
|
||||||
eigen != null &&
|
|
||||||
!enableCuda);
|
!enableCuda);
|
||||||
|
|
||||||
assert enableCuda -> (
|
|
||||||
mesa != null &&
|
|
||||||
cudatoolkit != null &&
|
|
||||||
cudnn != null);
|
|
||||||
|
|
||||||
assert !enableCuda -> (
|
|
||||||
!enableGPU || (
|
|
||||||
opencl-headers != null &&
|
|
||||||
ocl-icd != null));
|
|
||||||
|
|
||||||
assert enableTcmalloc -> (
|
|
||||||
gperftools != null);
|
|
||||||
|
|
||||||
let
|
let
|
||||||
env = if enableCuda
|
env = if enableCuda
|
||||||
then gcc8Stdenv
|
then gcc8Stdenv
|
||||||
@ -45,15 +34,18 @@ let
|
|||||||
|
|
||||||
in env.mkDerivation rec {
|
in env.mkDerivation rec {
|
||||||
pname = "katago";
|
pname = "katago";
|
||||||
version = "1.6.1";
|
version = "1.8.0";
|
||||||
|
githash = "8ffda1fe05c69c67342365013b11225d443445e8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lightvector";
|
owner = "lightvector";
|
||||||
repo = "katago";
|
repo = "katago";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "030ff9prnvpadgcb4x4hx6b6ggg10bwqcj8vd8nwrdz9sjq67yf7";
|
sha256 = "18r75xjj6vv2gbl92k9aa5bd0cxf09zl1vxlji148y0xbvgv6p8c";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fakegit = writeShellScriptBin "git" "echo ${githash}";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
makeWrapper
|
makeWrapper
|
||||||
@ -70,6 +62,8 @@ in env.mkDerivation rec {
|
|||||||
] ++ lib.optionals (enableGPU && !enableCuda) [
|
] ++ lib.optionals (enableGPU && !enableCuda) [
|
||||||
opencl-headers
|
opencl-headers
|
||||||
ocl-icd
|
ocl-icd
|
||||||
|
] ++ lib.optionals enableContrib [
|
||||||
|
openssl
|
||||||
] ++ lib.optionals enableTcmalloc [
|
] ++ lib.optionals enableTcmalloc [
|
||||||
gperftools
|
gperftools
|
||||||
];
|
];
|
||||||
@ -84,6 +78,10 @@ in env.mkDerivation rec {
|
|||||||
"-DUSE_BACKEND=CUDA"
|
"-DUSE_BACKEND=CUDA"
|
||||||
] ++ lib.optionals (enableGPU && !enableCuda) [
|
] ++ lib.optionals (enableGPU && !enableCuda) [
|
||||||
"-DUSE_BACKEND=OPENCL"
|
"-DUSE_BACKEND=OPENCL"
|
||||||
|
] ++ lib.optionals enableContrib [
|
||||||
|
"-DBUILD_DISTRIBUTED=1"
|
||||||
|
"-DNO_GIT_REVISION=OFF"
|
||||||
|
"-DGIT_EXECUTABLE=${fakegit}/bin/git"
|
||||||
] ++ lib.optionals enableTcmalloc [
|
] ++ lib.optionals enableTcmalloc [
|
||||||
"-DUSE_TCMALLOC=ON"
|
"-DUSE_TCMALLOC=ON"
|
||||||
] ++ lib.optionals enableBigBoards [
|
] ++ lib.optionals enableBigBoards [
|
||||||
|
Loading…
Reference in New Issue
Block a user