rocmPackages.hiprt: tidy, disable kernel encryption support (#443608)

Changed files
+11 -10
pkgs
development
rocm-modules
6
hiprt
+11 -10
pkgs/development/rocm-modules/6/hiprt/default.nix
···
fetchFromGitHub,
cmake,
clr,
-
gcc,
python3,
}:
···
};
postPatch = ''
-
g++ contrib/easy-encryption/cl.cpp -o contrib/easy-encryption/bin/linux/ee64 #replacing prebuilt binary
substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib'
substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/'
'';
nativeBuildInputs = [
-
gcc # required for replacing easy-encryption binary
cmake
python3
];
···
];
cmakeFlags = [
-
"-D CMAKE_BUILD_TYPE=Release"
-
"-D BAKE_KERNEL=OFF"
-
"-D BAKE_COMPILED_KERNEL=OFF"
-
"-D BITCODE=ON"
-
"-D PRECOMPILE=ON"
-
"-D NO_UNITTEST=ON"
-
"-D FORCE_DISABLE_CUDA=ON"
];
postInstall = ''
···
maintainers = with lib.maintainers; [
mksafavi
];
platforms = lib.platforms.linux;
};
})
···
fetchFromGitHub,
cmake,
clr,
python3,
}:
···
};
postPatch = ''
+
rm -rf contrib/easy-encrypt # contains prebuilt easy-encrypt binaries, we disable encryption
substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib'
substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/'
'';
nativeBuildInputs = [
cmake
python3
];
···
];
cmakeFlags = [
+
(lib.cmakeBool "BAKE_KERNEL" false)
+
(lib.cmakeBool "BAKE_COMPILED_KERNEL" false)
+
(lib.cmakeBool "BITCODE" true)
+
(lib.cmakeBool "PRECOMPILE" true)
+
# needs accelerator
+
(lib.cmakeBool "NO_UNITTEST" true)
+
# we have no need to support baking encrypted kernels into object files
+
(lib.cmakeBool "NO_ENCRYPT" true)
+
(lib.cmakeBool "FORCE_DISABLE_CUDA" true)
];
postInstall = ''
···
maintainers = with lib.maintainers; [
mksafavi
];
+
teams = [ lib.teams.rocm ];
platforms = lib.platforms.linux;
};
})