Unverified Commit 9342064a authored by Paul Mulders's avatar Paul Mulders Committed by Luna Nova
Browse files

miopen: fix src/comgr.cpp patching for HIPRTC compile ROCM PATH



Co-authored-by: default avatarLuna Nova <git@lunnova.dev>
parent 61efb76e
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
  half,
  boost,
  sqlite,
  symlinkJoin,
  bzip2,
  lbzip2,
  nlohmann_json,
@@ -82,6 +83,15 @@ let
    )
  );

  # for hiprtcCompileProgram (dropout kernels require rocrand in -I at runtime)
  hiprtcCompileRocmPath = symlinkJoin {
    name = "miopen-hiprtc-compile-rocm-path";
    paths = [
      clr
      rocrand
    ];
  };

  # Kernel databases moved from Git LFS to DVC (anonymous s3 bucket s3://therock-dvc/rocm-libraries)
  fetchKdb =
    name:
@@ -243,7 +253,7 @@ stdenv.mkDerivation (finalAttrs: {
    patchShebangs test src/composable_kernel fin utils install_deps.cmake

    substituteInPlace src/comgr.cpp \
      --replace-fail '"/opt/rocm"' '"${clr}"'
      --replace-fail '"/opt/rocm"' '"${hiprtcCompileRocmPath}"'
  ''
  + linkKDBsTo "src/kernels"
  + ''