From 5adc3ad6fe39bea2778258d9d6ecd79d64697e71 Mon Sep 17 00:00:00 2001 From: mksafavi Date: Wed, 28 May 2025 16:43:45 +0330 Subject: [PATCH] rocmPackages.hiprt: init at 2.5.a21e075.3 --- pkgs/development/rocm-modules/6/default.nix | 4 ++ .../rocm-modules/6/hiprt/default.nix | 59 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/rocm-modules/6/hiprt/default.nix diff --git a/pkgs/development/rocm-modules/6/default.nix b/pkgs/development/rocm-modules/6/default.nix index c399061c1992..47588fd29446 100644 --- a/pkgs/development/rocm-modules/6/default.nix +++ b/pkgs/development/rocm-modules/6/default.nix @@ -142,6 +142,8 @@ let hipfft = self.callPackage ./hipfft { }; + hiprt = self.callPackage ./hiprt { }; + tensile = pyPackages.callPackage ./tensile { inherit (self) rocmUpdateScript @@ -323,6 +325,7 @@ let rocprim rocalution hipfft + hiprt rocm-core hipcub hipblas @@ -355,6 +358,7 @@ let hipblaslt rocfft hipfft + hiprt rccl rocsparse hipsparse diff --git a/pkgs/development/rocm-modules/6/hiprt/default.nix b/pkgs/development/rocm-modules/6/hiprt/default.nix new file mode 100644 index 000000000000..01deca5685bd --- /dev/null +++ b/pkgs/development/rocm-modules/6/hiprt/default.nix @@ -0,0 +1,59 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + clr, + gcc, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hiprt"; + version = "2.5.a21e075.3"; + + src = fetchFromGitHub { + owner = "GPUOpen-LibrariesAndSDKs"; + repo = "HIPRT"; + tag = finalAttrs.version; + sha256 = "sha256-3yGhwIsFHlFMCEzuYnXuXNzs99m7f2LTkYaTGs0GEcI="; + }; + + postPatch = '' + g++ contrib/easy-encryption/cl.cpp -o contrib/easy-encryption/bin/linux/ee64 #replacing prebuilt binary + ''; + + nativeBuildInputs = [ + gcc # required for replacing easy-encryption binary + cmake + ]; + + buildInputs = [ + clr + ]; + + 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 = '' + mv $out/bin $out/lib + ln -sr $out/lib/libhiprt*64.so $out/lib/libhiprt64.so + install -v -Dm644 ../scripts/bitcodes/hiprt*_amd_lib_linux.bc $out/lib/ + ''; + + meta = { + homepage = "https://gpuopen.com/hiprt"; + description = "Ray tracing library for HIP"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + mksafavi + ]; + platforms = lib.platforms.linux; + }; +})