anchor.diff:  # Apply patches to various repos
   RUN mkdir -p /patch && cd /patch && \
       wget ${gem5_dist}/rocm_patches/hipBLAS.patch && \
  -    wget ${gem5_dist}/rocm_patches/hip.patch_v2 && \
       wget ${gem5_dist}/rocm_patches/miopen-conv.patch && \
       wget ${gem5_dist}/rocm_patches/rocBLAS.patch
   
  -RUN git -C /HIP/ checkout 0e3d824e && git -C /HIP/ apply /patch/hip.patch_v2 && \
  -    git -C /hipBLAS/ checkout ee57787e && git -C /hipBLAS/ apply /patch/hipBLAS.patch && \
  +RUN git -C /hipBLAS/ checkout ee57787e && git -C /hipBLAS/ apply /patch/hipBLAS.patch && \
       git -C /rocBLAS/ checkout cbff4b4e && git -C /rocBLAS/ apply /patch/rocBLAS.patch && \
       git -C /rocm-cmake/ checkout 12670acb && \
       git -C /MIOpenGEMM/ checkout 9547fb9e && \
  
positive.code:     -DMIOPEN_CACHE_DIR=/.cache/miopen \
      -DMIOPEN_AMDGCN_ASSEMBLER_PATH=/opt/rocm/opencl/bin \
      -DHALF_INCLUDE_DIR=/MIOpen/half-1.12.0/include \
      -DCMAKE_CXX_FLAGS="-isystem /usr/include/x86_64-linux-gnu" .. && \
      make -j$(nproc) && make install && rm -rf *
  
  # Re-set defaults
  
negative.code: ENV HCC_AMDGPU_TARGET gfx801
  
  # Create build dirs for machine learning ROCm installs
  RUN mkdir -p /rocBLAS/build && \
      mkdir -p /hipBLAS/build && \
      mkdir -p /rocm-cmake/build && \
      mkdir -p /MIOpenGEMM/build && \
      mkdir -p /MIOpen/build
  
  # Do the builds, empty build dir to trim image size
  WORKDIR /rocBLAS/build
  RUN CXX=/opt/rocm/bin/hcc cmake -DCMAKE_CXX_FLAGS="--amdgpu-target=gfx801" .. && \
      make -j$(nproc) && make install && rm -rf *
  