From 882158afe0f6fe1a965d83f971bf217587d49082 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Mon, 29 Sep 2025 08:06:22 -0700 Subject: [PATCH] rocmPackages.hiprt: disable kernel encryption support Per upstream encryption of kernels was a holdover from when hiprt was closed source. Let's disable it and drop the need to rebuild easy-encryption. https://github.com/GPUOpen-LibrariesAndSDKs/HIPRT/issues/11#issuecomment-2105410458 --- pkgs/development/rocm-modules/6/hiprt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/rocm-modules/6/hiprt/default.nix b/pkgs/development/rocm-modules/6/hiprt/default.nix index e9bff45a7d72..d856477a01cc 100644 --- a/pkgs/development/rocm-modules/6/hiprt/default.nix +++ b/pkgs/development/rocm-modules/6/hiprt/default.nix @@ -4,7 +4,6 @@ fetchFromGitHub, cmake, clr, - gcc, python3, }: @@ -20,13 +19,12 @@ stdenv.mkDerivation (finalAttrs: { }; postPatch = '' - g++ contrib/easy-encryption/cl.cpp -o contrib/easy-encryption/bin/linux/ee64 #replacing prebuilt binary + 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 = [ - gcc # required for replacing easy-encryption binary cmake python3 ]; @@ -42,6 +40,8 @@ stdenv.mkDerivation (finalAttrs: { (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) ];