diff options
author | Madoura <madouura@gmail.com> | 2022-12-12 17:36:53 -0600 |
---|---|---|
committer | Madoura <madouura@gmail.com> | 2022-12-18 12:39:56 -0600 |
commit | 785ed480aafdde6cbbffb7605f1cd988f8524dab (patch) | |
tree | 14298061c3bd7221bf65909ce2d485db8725aef2 /pkgs/development/tools/rocminfo | |
parent | 0ee533a8e00d7131b7a7d5d6d5f605f18af07426 (diff) |
rocm-related: standardize
rocminfo: standardize rocm-thunk: standardize rocm-opencl-icd: standardize rocclr: standardize rocm-device-libs: standardize rocm-comgr: standardize rocm-opencl-runtime: standardize rocm-runtime: standardize clang-ocl: standardize composable_kernel: standardize hipcub: standardize hipsparse: standardize miopengemm: standardize rccl: standardize rocfft: standardize rocprim: standardize rocsparse: standardize rocmlir: standardize rocrand: standardize tensile: standardize rocm-cmake: standardize rocm-smi: standardize miopen: standardize
Diffstat (limited to 'pkgs/development/tools/rocminfo')
-rw-r--r-- | pkgs/development/tools/rocminfo/default.nix | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/pkgs/development/tools/rocminfo/default.nix b/pkgs/development/tools/rocminfo/default.nix index 34dcb52526bd0..2a714829d91c2 100644 --- a/pkgs/development/tools/rocminfo/default.nix +++ b/pkgs/development/tools/rocminfo/default.nix @@ -1,13 +1,12 @@ -{ stdenv -, lib +{ lib +, stdenv , fetchFromGitHub , rocmUpdateScript -, fetchpatch , cmake -, rocm-runtime -, python3 , rocm-cmake +, rocm-runtime , busybox +, python3 , gnugrep # rocminfo requires that the calling user have a password and be in # the video group. If we let rocm_agent_enumerator rely upon @@ -29,25 +28,21 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-4wZTm5AZgG8xEd6uYqxWq4bWZgcSYZ2WYA1z4RAPF8U="; }; - enableParallelBuilding = true; - nativeBuildInputs = [ cmake ]; - buildInputs = [ rocm-cmake rocm-runtime ]; - - cmakeFlags = [ - "-DROCM_DIR=${rocm-runtime}" - "-DROCRTST_BLD_TYPE=Release" + nativeBuildInputs = [ + cmake + rocm-cmake ]; + buildInputs = [ rocm-runtime ]; + propagatedBuildInputs = [ python3 ]; + cmakeFlags = [ "-DROCRTST_BLD_TYPE=Release" ]; + prePatch = '' - sed 's,#!/usr/bin/env python3,#!${python3}/bin/python,' -i rocm_agent_enumerator + patchShebangs rocm_agent_enumerator sed 's,lsmod | grep ,${busybox}/bin/lsmod | ${gnugrep}/bin/grep ,' -i rocminfo.cc ''; - installPhase = '' - mkdir -p $out/bin - cp rocminfo $out/bin - cp rocm_agent_enumerator $out/bin - '' + lib.optionalString (defaultTargets != []) '' + postInstall = lib.optionalString (defaultTargets != [ ]) '' echo '${lib.concatStringsSep "\n" defaultTargets}' > $out/bin/target.lst ''; @@ -63,6 +58,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.ncsa; maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.isAarch64 || finalAttrs.version != stdenv.cc.version; }; }) |