anchor.diff:      libboost-system-dev \
       libboost-dev
   
  -ARG gem5_dist=http://dist.gem5.org/dist/current
  +ARG gem5_dist=http://dist.gem5.org/dist/develop
   
   # Install ROCm 1.6 binaries
   RUN wget -qO- ${gem5_dist}/apt_1.6.2.tar.bz2 \
  
positive.code: RUN mkdir -p /patch && cd /patch && \
      wget ${gem5_dist}/rocm_patches/hipBLAS.patch && \
      wget ${gem5_dist}/rocm_patches/hip.patch && \
      wget ${gem5_dist}/rocm_patches/miopen.patch && \
      wget ${gem5_dist}/rocm_patches/rocBLAS.patch
  
  RUN git -C /HIP/ checkout 0e3d824e && git -C /HIP/ apply /patch/hip.patch && \
      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 /MIOpenGEMM/ checkout 9547fb9e && \
      git -C /MIOpen/ checkout a9949e30 && git -C /MIOpen/ apply /patch/miopen.patch
  
  ENV ROCM_PATH /opt/rocm
  ENV HCC_HOME ${ROCM_PATH}/hcc
  
negative.code: # Should link this in as a volume if at all possible
  RUN mkdir -p /.cache/miopen && chmod 777 /.cache/miopen
  
  # Un-set default c++ version for MIOpen compilation
  # As MIOpen 1.7 requires c++14 or higher
  RUN sed -i 's/INTERFACE_COMPILE_OPTIONS "-std=c++amp;-fPIC;-gline-tables-only"/#&/' /opt/rocm/hcc-1.0/lib/cmake/hcc/hcc-targets.cmake && \
      sed -i 's/INTERFACE_COMPILE_OPTIONS "-hc"/#&/' /opt/rocm/hcc-1.0/lib/cmake/hcc/hcc-targets.cmake
  
  WORKDIR /MIOpen
  # Half is required; This is the version that MIOpen would download
  RUN wget https://github.com/pfultz2/half/archive/1.12.0.tar.gz && \
      tar -xzf 1.12.0.tar.gz
  
  WORKDIR /MIOpen/build
  RUN CXX=/opt/rocm/hcc/bin/hcc cmake \
      -DCMAKE_BUILD_TYPE=Debug \
  